Leftover questions about age #367
-
Hello, please excuse me if it is a stupid question, but I am not familiar with cryptography, so please give me an answer.
Isn't it possible that at some point all possible combinations will be used up and that by chance someone will have the same
|
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
@UnixCro There are so insanely many possible secret keys that it is impossible to ever create the same ones again, assuming that the source of random numbers is working properly. It is impossible to grasp how large the number of possibilities is, but here is a video that covers it quite well: https://www.youtube.com/watch?v=S9JGmA5_unY The encryption algorithm is ChaCha20 with Poly1305 authentication. This is mentioned in the specification, and is pretty much the best algorithm currently known, and also very widely used in different systems. Different types of recipient keys are used, as explained in the specs, to derive the file encryption key used with ChaCha20 which encrypts all your data. Armor means conversion into Base64, which is well explained in multiple sources, so that it becomes ASCII text, rather than binary data. This is to allow copy&pasting to messaging software, where you cannot always attach binary files. Age imitates PGP in that it also adds |
Beta Was this translation helpful? Give feedback.
-
The reason age supports armoring is not for copying files into messaging software (though it does enable that as a side effect), but because Windows machines don't have consistent handling of Unix line endings. The age format consistently uses The |
Beta Was this translation helpful? Give feedback.
-
This is becoming off topic, and I certainly respect the effort to follow an RFC, but a few comments on armoring... Indentation, different EOLs and quote marks Verifying that each line except for the last one is of full length, and that the last line is divisible by four protect against loss of characters (some systems miss characters when a large amount of text is pasted on a terminal, and in messaging if not properly code tagged, Given that Age has its plain text header also within the Base64 encoded content, the format can be easily verified even without these headers, and certainly one can just Presumably the headers would allow for easier extraction of Age snippets from a longer text, and the footer would allow Age to stop reading more input lines from console once the footer is seen. However, it seems that the current implementation does not do either of these, but instead decodes the message before even reading the footer: #364 |
Beta Was this translation helpful? Give feedback.
@UnixCro There are so insanely many possible secret keys that it is impossible to ever create the same ones again, assuming that the source of random numbers is working properly. It is impossible to grasp how large the number of possibilities is, but here is a video that covers it quite well: https://www.youtube.com/watch?v=S9JGmA5_unY
The encryption algorithm is ChaCha20 with Poly1305 authentication. This is mentioned in the specification, and is pretty much the best algorithm currently known, and also very widely used in different systems. Different types of recipient keys are used, as explained in the specs, to derive the file encryption key used with ChaCha20 which encrypts all your d…