Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support /dev/crypto for nuttx #6920

Merged
merged 5 commits into from Dec 13, 2022
Merged

Conversation

anjiahao1
Copy link
Contributor

Summary

support /dev/crypto for nuttx,base form openbsd
it suppot aes,des,hmac,gmac ..
The most important thing is to achieve unified management of hardware crypto

todo

overwrite existing aes mode
add hash stream
add Asymmetric encryption like rsa
add hardware achieve

Testing

pass it:
apache/nuttx-apps#1292

use ./tools/configure.sh sim:crypto

@anjiahao1 anjiahao1 changed the title support /dev/crpyto for nuttx support /dev/crypto for nuttx Aug 25, 2022
crypto/aes.c Outdated Show resolved Hide resolved
crypto/aes.c Outdated Show resolved Hide resolved
crypto/aes.c Outdated Show resolved Hide resolved
crypto/aes.c Show resolved Hide resolved
@anjiahao1 anjiahao1 force-pushed the crypto branch 4 times, most recently from db30099 to 81db2b5 Compare August 31, 2022 12:07
include/string.h Outdated Show resolved Hide resolved
@anjiahao1
Copy link
Contributor Author

i add some hardware support,but some aes mode not support. it will add next pr

arch/arm/src/lpc43xx/lpc43_crypto.c Outdated Show resolved Hide resolved
arch/arm/src/lpc43xx/lpc43_crypto.c Outdated Show resolved Hide resolved
include/crypto/xform.h Show resolved Hide resolved
include/crypto/sha2.h Show resolved Hide resolved
include/crypto/sha1.h Outdated Show resolved Hide resolved
arch/arm/src/stm32f0l0g0/stm32_crypto.c Outdated Show resolved Hide resolved
arch/arm/src/stm32f0l0g0/stm32_crypto.c Outdated Show resolved Hide resolved
arch/arm/src/stm32/stm32_crypto.c Outdated Show resolved Hide resolved
arch/arm/src/stm32/stm32_crypto.c Outdated Show resolved Hide resolved
arch/arm/src/stm32/stm32_crypto.c Outdated Show resolved Hide resolved
@anjiahao1
Copy link
Contributor Author

anjiahao1 commented Sep 21, 2022

@pkarashchenko Thanks for your codereivew, I just submitted it once

@xiaoxiang781216
Copy link
Contributor

@gustavonihei @Ouss4 this patch change esp crypto driver, please review it, thanks.

@xiaoxiang781216
Copy link
Contributor

Please rebase to the last mater to fix ci broken.

public header files put into include/crpyto
private header/source files put into crpyto

crypto.c cryptodev.[c|h] cryptosoft.[c|h] come from:
commit id is f245bed2a7593bf0decce50caaed4ce05fefd6cf

the rest come from:
commit id is 61b0e532b2dce0a91cf3ea67d346645a61a88cdd

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
1.fix type warning for compile
2.hamc key can less than specified length
3.add new version algorithms to cryptodev
    sha256hmac
    sha384hmac
    sha512hmac
    aes128gmac

Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
esp32c3: aes hmac-sha1 hmac-sha256
stm32f0l0g0 stm32l1 : aes
sam34: aes
lpc43: aes
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
@xiaoxiang781216 xiaoxiang781216 merged commit bc0fe0e into apache:master Dec 13, 2022
gustavonihei added a commit to gustavonihei/incubator-nuttx that referenced this pull request Dec 16, 2022
"aes_cypher" is a function from NuttX crypto, so better use instead of
defining a new interface in the driver.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
pkarashchenko pushed a commit that referenced this pull request Dec 16, 2022
"aes_cypher" is a function from NuttX crypto, so better use instead of
defining a new interface in the driver.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
chenzhihong007 pushed a commit to hpmicro/nuttx that referenced this pull request Mar 8, 2023
"aes_cypher" is a function from NuttX crypto, so better use instead of
defining a new interface in the driver.

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
@jerpelea jerpelea added this to To-Add in Release Notes - 12.1.0 Apr 3, 2023
@jerpelea jerpelea moved this from To-Add to Added in Release Notes - 12.1.0 Apr 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

7 participants