e2e key export uses strange AES-CTR construction #461
Labels
A-Client-Server
Issues affecting the CS API
A-E2EE
Issues about end-to-end encryption
clarification
An area where the expected behaviour is understood, but the spec could do with being more explicit
I've been trying to implement a reader for the exported key format (so I can have a hacky way of getting around vector-im/riot-web#6454 by downloading my entire key backup and then removing the parts which I don't want to share) in Python, but have discovered that the description of the format leads to some confusion -- I had to read the matrix-react-sdk source code to understand what was going on.
In short, currently the spec says:
However, IV is a bit of a strange term for AES-CTR -- usually you would refer to a "counter" and "nonce" (which are combined in the construction to produce the IV). I imagine most people would assume that the "IV" is the nonce -- because almost all AES-CTR constructions share nonces and not initial counter values, but in your case you are sharing an initial counter value and have a zero-length nonce.
Two questions:
The text was updated successfully, but these errors were encountered: