DaGenix / rust-crypto

A (mostly) pure-Rust implementation of various cryptographic algorithms.
Apache License 2.0
1.39k stars 295 forks source link

AesGcm with 16 byte nonce #422

Open moparisthebest opened 7 years ago

moparisthebest commented 7 years ago

It looks like AesGcm::new is hard-coded to assert nonce.len() == 12, but I need to inter-operate with other software that uses a 16 byte nonce. I tried simply removing the check and using my 16-byte nonce as-is, but that gave me different answers than the other software. Any ideas on how to fix this?

Thanks much

sigriston commented 6 years ago

@DaGenix IDK if rust-crypto is still maintained or if there's interest in this, but I do have a patch enabling AesGcm for nonce.len() > 12. Let me know if there's interest, I can send a PR in that case! :+1: :)