Seeking help for crypto libraries for RISC V.

60 views
Skip to first unread message

sathish kumar ganapathy

unread,
Mar 11, 2024, 8:57:53 AMMar 11
to RISC-V SW Dev
Hello All,

I am Sathish, pursuing a master's degree. I am currently doing my master's thesis. I am working with RISC V core, and I have to integrate the crypto libraries for RISC V and use it in my application.

I am new to RISC V and crypto. Can Someone please help me to find the cryptographic libraries for RISC V bare metal programming? As I want to integrate it and use those API's in my user application.

Note: The RISC V core with which I am working doesn't have crypto extension support. So searching for a crypto library that supports using its general instruction set.

Thanks in Advance.
Best Regards,
Sathish

Tommy Murphy

unread,
Mar 11, 2024, 3:21:55 PMMar 11
to sathish kumar ganapathy, RISC-V SW Dev
> Can Someone please help me to find the cryptographic libraries for RISC V bare metal programming? 

What language(s)?
What exactly do you mean by "crypto" libraries?
What specific crypto capabilities do you need support for?

> Note: The RISC V core with which I am working doesn't have crypto extension support. So searching for a crypto library that supports using its general instruction set.

Any library coded mainly or completely in a high-level language should be capable of being compiled for any RISC-V arch/abi. Most likely, it will only depend on crypto extensions if it explicitly uses the relevant instructions via assembly language code.

sathish kumar ganapathy

unread,
Mar 12, 2024, 5:30:47 AMMar 12
to RISC-V SW Dev, tommy_...@hotmail.com, sathish kumar ganapathy
Thanks for the reply.
What language(s)? 
  - I looking for a library written in c
What exactly do you mean by "crypto" libraries?
 - I am looking for an AES and HMAC library.
What specific crypto capabilities do you need support for?
- I like to encrypt the data using AES and authenticate with HMAC.


Any library coded mainly or completely in a high-level language should be capable of being compiled for any RISC-V arch/abi. Most likely, it will only depend on crypto extensions if it explicitly uses the relevant instructions via assembly language code.
- Okay understood. Thanks for the explanation.

Tommy Murphy

unread,
Mar 12, 2024, 5:47:23 AMMar 12
to sathish kumar ganapathy, RISC-V SW Dev, sathish kumar ganapathy
> - I am looking for an AES and HMAC library.

So, I would start by searching for open-source implementations of these algorithms and seeing what's involved in compiling them for RISC-V and, if necessary, wrapping them in whatever sort of APIs you need for your purposes.

Tommy Murphy

unread,
Mar 12, 2024, 8:35:22 AMMar 12
to sathish kumar ganapathy, RISC-V SW Dev, sathish kumar ganapathy
Maybe this would be worth looking at?


It has repos for what look like small/efficient/simple implementations of AES and HMAC...

sathish kumar ganapathy

unread,
Mar 12, 2024, 1:02:35 PMMar 12
to RISC-V SW Dev, tommy_...@hotmail.com, sathish kumar ganapathy
Thank you for providing me with this information. I will look into it.
Reply all
Reply to author
Forward
0 new messages