| 4336ef7e | 18-Nov-2023 |
Aaron LI <aly@aaronly.me> |
opencrypto: Update aes_ctr_setkey() to validate key bits to avoid panic
AES rijndaelKeySetupEnc() only accepts key of length 128/192/256 bits and it uses a KASSERT() to assert this. However, aes_ct
opencrypto: Update aes_ctr_setkey() to validate key bits to avoid panic
AES rijndaelKeySetupEnc() only accepts key of length 128/192/256 bits and it uses a KASSERT() to assert this. However, aes_ctr_setkey() can be given an improper key via ioctl() and thus panic the system. Fix this panic by validating the key in aes_ctr_setkey() before calling rijndaelKeySetupEnc().
This partially resolves bug #3311.
Bug: https://bugs.dragonflybsd.org/issues/3311
show more ...
|
| e340ae2a | 18-Nov-2023 |
Aaron LI <aly@aaronly.me> |
opencrypto: Update auth_hash.Setkey() to return an error code
The Setkey() method can fail, so better to change it return an error code for the caller to properly handle it. This also makes it like
opencrypto: Update auth_hash.Setkey() to return an error code
The Setkey() method can fail, so better to change it return an error code for the caller to properly handle it. This also makes it like enc_xform.setkey(), which also returns an error code.
Update AES_GMAC_Setkey() accordingly.
show more ...
|
| 0e34d1b9 | 18-Nov-2023 |
Aaron LI <aly@aaronly.me> |
opencrypto: Manage context memory within cryptosoft
Each algorithm declares its context size and let cryptosoft allocate and free the context memory. This greatly simplifies the setkey() routine of
opencrypto: Manage context memory within cryptosoft
Each algorithm declares its context size and let cryptosoft allocate and free the context memory. This greatly simplifies the setkey() routine of each algorithm and removes the unnecessary zerokey() routine.
Derived from OpenBSD: https://github.com/openbsd/src/commit/2dbd8e13008692ff92b9560da7b770daf2889930
show more ...
|