Migrate the AesCtrHmacAeadKeyManager to a KeyTypeManager.
The tests will be migrated in a follow up cl. *NOTE* that I change how some of the things are done. In particular, previously: * The underlying HMac was generated by calling the registry. * The underlying HMac key was manually created, without going through the registry. The version was set wrongly (to the version of the AesCtrHmacAeadKeyManager instead of the HMacKeyManager). * The underlying HMac key was now validated in this key manager. * The underlying HMac format was not validated. After this cl, I use the HMac KeyTypeManager to validate things; and I do that directly without going through the registry. I think the proper way would be to have some kind of registry access, where this KeyManager can obtain the new HMacKey *Type* manager, and then do the proper things. But this is complicated :/ I think this here is the second best solution. PiperOrigin-RevId: 264568255
Showing
- cc/aead/BUILD.bazel 4 additions, 2 deletionscc/aead/BUILD.bazel
- cc/aead/CMakeLists.txt 4 additions, 2 deletionscc/aead/CMakeLists.txt
- cc/aead/aead_config.cc 1 addition, 1 deletioncc/aead/aead_config.cc
- cc/aead/aead_key_templates_test.cc 8 additions, 6 deletionscc/aead/aead_key_templates_test.cc
- cc/aead/aes_ctr_hmac_aead_key_manager.cc 40 additions, 72 deletionscc/aead/aes_ctr_hmac_aead_key_manager.cc
- cc/aead/aes_ctr_hmac_aead_key_manager.h 28 additions, 28 deletionscc/aead/aes_ctr_hmac_aead_key_manager.h
- cc/aead/aes_ctr_hmac_aead_key_manager_test.cc 25 additions, 19 deletionscc/aead/aes_ctr_hmac_aead_key_manager_test.cc
Loading
Please register or sign in to comment