jwcrypto icon indicating copy to clipboard operation
jwcrypto copied to clipboard

Key size on generation is not always computed correctly

Open simo5 opened this issue 2 years ago • 0 comments

For algorithms like A256CBC-HS512 the output keysize is 256 bits, but the input keysize is expected to be 512 bits.

When a JWK(generate='oct', alg='A256CBC-HS512') command is invoked the code tries to determine the default key size to be used, and it does that by inquiring the JWA algorithm for its keysize.

Unfortunately the reported key size for these algorithms is the output key size and not the input keysize ...

simo5 avatar Sep 14 '22 19:09 simo5