Merge pull request #2633 from tmael/cc_310

Update Cryptocell readme
This commit is contained in:
toddouska 2019-12-27 12:58:19 -08:00 committed by GitHub
commit 95daec5326
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 2 deletions

View File

@ -22,13 +22,15 @@ The `IDE/CRYPTOCELL/main.c` example application provides a function to run the s
- SHA-256
- AES CBC
- CryptoCell 310 RNG
- RSA sign/verify and RSA key gen
- RSA sign/verify and RSA key gen (2048 bit in PKCSv1.5 padding mode)
- RSA encrypt/decrypt
- ECC sign/verify/shared secret
- ECC key import/export and key gen pairs
- Hardware RNG
- RTC for benchmark timing source
Note: All Cryptocell features are not supported. The wolfcrypt RSA API allows import and export of Private/Public keys in DER format. However, this is not possible with key pairs generated with Cryptocell because the importing/exporting Cryptocell keys has not been implemented yet.
## Setup
### Setting up Nordic SDK with wolfSSL
1. Download the wolfSSL source code or a zip file from GitHub and place it under your SDK `InstallFolder/external/` directory. You can also copy or simlink to the source.

View File

@ -3106,7 +3106,7 @@ int wc_RsaPrivateDecrypt_ex(const byte* in, word32 inLen, byte* out,
#endif /* WC_NO_RSA_OAEP || WC_RSA_NO_PADDING */
#endif /* WOLFSSL_RSA_PUBLIC_ONLY */
#if !defined(WOLFSSL_CRYPTOCELL)
int wc_RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, RsaKey* key)
{
WC_RNG* rng = NULL;
@ -3117,6 +3117,7 @@ int wc_RsaSSL_VerifyInline(byte* in, word32 inLen, byte** out, RsaKey* key)
RSA_PUBLIC_DECRYPT, RSA_BLOCK_TYPE_1, WC_RSA_PKCSV15_PAD,
WC_HASH_TYPE_NONE, WC_MGF1NONE, NULL, 0, 0, rng);
}
#endif
#ifndef WOLFSSL_RSA_VERIFY_ONLY
int wc_RsaSSL_Verify(const byte* in, word32 inLen, byte* out, word32 outLen,

View File

@ -11855,6 +11855,16 @@ int rsa_test(void)
#ifndef WOLFSSL_RSA_VERIFY_INLINE
#if defined(WOLFSSL_CRYPTOCELL)
/*
Cryptocell requires the input data and signature byte array to verify.
first argument must be the input data
second argument must be the length of input data
third argument must be the signature byte array or the output from
wc_RsaSSL_Sign()
fourth argument must be the length of the signature byte array
*/
ret = wc_RsaSSL_Verify(in, inLen, out, outSz, &key);
#else
ret = wc_RsaSSL_Verify(out, idx, plain, plainSz, &key);