diff options
Diffstat (limited to 'chip/g/dcrypto/dcrypto.h')
-rw-r--r-- | chip/g/dcrypto/dcrypto.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chip/g/dcrypto/dcrypto.h b/chip/g/dcrypto/dcrypto.h index 0856ec76c6..a412adee5a 100644 --- a/chip/g/dcrypto/dcrypto.h +++ b/chip/g/dcrypto/dcrypto.h @@ -94,12 +94,15 @@ struct RSA { enum padding_mode { PADDING_MODE_PKCS1 = 0, PADDING_MODE_OAEP = 1, - PADDING_MODE_PSS = 2 + PADDING_MODE_PSS = 2, + /* USE OF NULL PADDING IS NOT RECOMMENDED. + * SUPPORT EXISTS AS A REQUIREMENT FOR TPM2 OPERATION. */ + PADDING_MODE_NULL = 3 }; /* Calculate r = m ^ e mod N */ int DCRYPTO_rsa_encrypt(struct RSA *rsa, uint8_t *out, uint32_t *out_len, - const uint8_t *in, const uint32_t in_len, + const uint8_t *in, uint32_t in_len, enum padding_mode padding, enum hashing_mode hashing, const char *label); |