Daniel M. Zimmerman via RT
2014-10-01 07:08:54 UTC
In attempting to write code to run some CAVP tests for key wrapping, I was pleased to find the new AES key wrapping APIs added recently to EVP; however, it appears that the included support in âe_aes.câ is hardcoded to use the AES encryption function for key wrapping and the AES decryption function for key unwrapping. NIST SP 800-38F specifies that the cipher function can be chosen independently of whether one is wrapping or unwrapping keys; that is, one might choose the AES decryption function as the cipher function for wrapping a key (in which case, the AES encryption function would be used to unwrap the wrapped key).
It seems that the underlying CRYPTO_ APIs for key wrapping in âwrap128.c" would work fine with any choice of block processing function, so itâs really a matter of being able to indicate in the higher-level EVP APIs the âdirectionâ of the cipher function relative to wrapping and unwrapping. Is there any chance of an API change before the 1.0.2 release to add this functionality at the EVP level? (I can try to write the patch myself, but I suspect it will be much faster if somebody who actually has a firm grasp of the APIs does so; Iâm still feeling my way around them)
-Dan Zimmerman
â
Daniel M. Zimmerman <***@galois.com>
Research and Engineering, Galois, Inc.
It seems that the underlying CRYPTO_ APIs for key wrapping in âwrap128.c" would work fine with any choice of block processing function, so itâs really a matter of being able to indicate in the higher-level EVP APIs the âdirectionâ of the cipher function relative to wrapping and unwrapping. Is there any chance of an API change before the 1.0.2 release to add this functionality at the EVP level? (I can try to write the patch myself, but I suspect it will be much faster if somebody who actually has a firm grasp of the APIs does so; Iâm still feeling my way around them)
-Dan Zimmerman
â
Daniel M. Zimmerman <***@galois.com>
Research and Engineering, Galois, Inc.