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
Hi, I'm developing a protocol that requires interoperability between clients written in different languages using the AES encryption algorithm. Our first clients were in Rust, and I'm working on a Java implementation now. Basically we want a Java client to be able to encrypt a payload, send it to the Rust client, and have the Rust client decrypt it. Not rocket science.
In the process of testing, I'm generating a key in Rust, like so:
...but when I try to use this key to decrypt in Java, I get this error: Invalid AES key length: 64 bytes
Sure enough... it looks like the bytekey vector length (Vec) is 64. I would have expected it to be 32! Can someone help me understand what I'm missing?
Potentially relevant: I'm base64 encoding the key rather than sending it as raw bytes
The text was updated successfully, but these errors were encountered:
Hi, I'm developing a protocol that requires interoperability between clients written in different languages using the AES encryption algorithm. Our first clients were in Rust, and I'm working on a Java implementation now. Basically we want a Java client to be able to encrypt a payload, send it to the Rust client, and have the Rust client decrypt it. Not rocket science.
In the process of testing, I'm generating a key in Rust, like so:
...but when I try to use this key to decrypt in Java, I get this error:
Invalid AES key length: 64 bytes
Sure enough... it looks like the
bytekey
vector length (Vec) is 64. I would have expected it to be 32! Can someone help me understand what I'm missing?Potentially relevant: I'm base64 encoding the key rather than sending it as raw bytes
The text was updated successfully, but these errors were encountered: