Repository navigation
Replies: 2 comments 3 replies
|
So you want a built is way to back-door files so they appear to be encrypted more securely than they are? How would that be a smart thing to include in the tooling out of the box? You realize that the definition of NONCE is "a number used once and only once" right? And that if you invalidate that premise you immediately start breaking down the security properties of the encryption scheme? You can't cheat math like that and say "but I'm only reusing it twice" or "only reusing it for a limited set of users" or whatever. The security property it creates is absolutely hinged on "once" being "once and only ever once". |
|
@d3rped from your description it's kind of unclear to me if:
Disclaimer: I'm not a cryptographer, not even an applied cryptography engineer. However, setting all that aside, with the current Age implementation I don't think it's easy to achieve what you are asking for, namely, given the same plain text file, and the same recipients (either shared secret or public keys), you'll get the same output. The reason is that if you look closer at the Age specification, you'll see that randomness is employed in quite a few places throughout the process:
What might be a possible solution: using something based on Alternatively, the most naive way to implement this would be to just take the plain text, HMAC it using domain separation plus the context (like the path, and which users are allowed to read it), and use that as the input for a few other domain separated HMACs to fill in the other sources of randomness as described above. However, for your particular use-case I don't think it makes much sense to break Age by applying these changes, perhaps it's just easier to do the following:
BUT THERE ARE MANY ISSUES WITH THIS PROPOSAL:
Finally, as shameless plug, if you insist on going this route, I do have my own experimental encryption tool If you would like to discuss more about my tool, please open a discussion thread in that repository. Disclaimer: again, I am not a cryptographer! |
Uh oh!
There was an error while loading. Please reload this page.
I know the ciphertext output of age is, by design, non-deterministic.
For my use case I need to be able to replay encryption payloads.
It is probably easiest to just give a strongly simplified explanation of what I'm trying to do.
I'm currently writing a small wrapper around age to implement encrypted file sharing.
Permissions are split into "users" who are allowed to:
When a file is added or modified the following is done (assuming I could read/write the nonce):
This way a client does not need to store encrypted copies of large files and create signed snapshots.
Is there any chance of adding a way to override the nonce data for an Encrypt call in the go library?
All reactions