You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems to be that there is an unstated limitation for the crypto_secretstream_ API, we must pass the whole output of the *_push function to the *_pull function for it to work, right?
But it wouldn't be possible for me to call the *_pull function with CIPHERTEXT_PART1_LEN/2 twice and get the original data. We must preserve the size as a single unit.
The reason that this matters is that I'm looking at using this over a network protocol, and I need to be able to provide a mechanism to pass the length of the value that I'm writing to the other side in a way that it can read.
Over the wire, that will end up looking like:
[170 bytes] [ encrypted] [ 824 bytes] [encrypted], etc.
Am I understanding things properly? Do I need to worry about leaking the fragment lengths? Do I need to implement some form of padding to avoiding leaking the size of the messages that I'm sending?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
It seems to be that there is an unstated limitation for the
crypto_secretstream_
API, we must pass the whole output of the*_push
function to the*_pull
function for it to work, right?In other words, I have this code:
But it wouldn't be possible for me to call the
*_pull
function withCIPHERTEXT_PART1_LEN/2
twice and get the original data. We must preserve the size as a single unit.The reason that this matters is that I'm looking at using this over a network protocol, and I need to be able to provide a mechanism to pass the length of the value that I'm writing to the other side in a way that it can read.
Over the wire, that will end up looking like:
[170 bytes] [ encrypted] [ 824 bytes] [encrypted]
, etc.Am I understanding things properly? Do I need to worry about leaking the fragment lengths? Do I need to implement some form of padding to avoiding leaking the size of the messages that I'm sending?
Beta Was this translation helpful? Give feedback.
All reactions