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

Add AES plugin for NexysA7 #53

Merged
merged 1 commit into from
Nov 15, 2020
Merged

Conversation

roman3017
Copy link
Contributor

  • add aes plugin
  • change number of gpio pins to 32
  • fix cpuCount
  • add audio and video sections to readme file

@Dolu1990 Dolu1990 merged commit f2dc88e into SpinalHDL:dev-0.1 Nov 15, 2020
@Dolu1990
Copy link
Member

Thanks ^^

About the AES plugin, i have some local change to properly enable it, i just need a bit more def to polish it :)

Else @svancau and me are trying to update to linux 5.10

@roman3017
Copy link
Contributor Author

roman3017 commented Nov 15, 2020

That is good to know. I was hoping to see how much speed up comes from HW acceleration so I have also started to look at crypto driver. But will wait for you. With NO acceleration I am getting 1MB/s:

rroot@buildroot:~# openssl speed -elapsed -evp aes-128-cbc                                                                              
You have chosen to measure elapsed time instead of user CPU time.                                                                      
Doing aes-128-cbc for 3s on 16 size blocks: 106841 aes-128-cbc's in 3.00s                                                              
Doing aes-128-cbc for 3s on 64 size blocks: 41226 aes-128-cbc's in 3.00s                                                               
Doing aes-128-cbc for 3s on 256 size blocks: 12172 aes-128-cbc's in 3.01s                                                              
Doing aes-128-cbc for 3s on 1024 size blocks: 3212 aes-128-cbc's in 3.00s                                                              
Doing aes-128-cbc for 3s on 8192 size blocks: 401 aes-128-cbc's in 3.01s                                                               
Doing aes-128-cbc for 3s on 16384 size blocks: 201 aes-128-cbc's in 3.00s                                                              
OpenSSL 1.1.1f  31 Mar 2020                                                                                                            
built on: Sun Nov 15 01:31:47 2020 UTC                                                                                                 
options:bn(64,32) rc4(char) des(long) aes(partial) idea(int) blowfish(ptr)                                                             
compiler: riscv32-buildroot-linux-gnu-gcc -fPIC -pthread -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -D_LARGEFIL4
The 'numbers' are in 1000s of bytes per second processed.                                                                              
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes                                             
aes-128-cbc        569.82k      879.49k     1035.23k     1096.36k     1091.36k     1097.73k                                                                            

Updating to Linux 5.10 is really nice too.

@Dolu1990
Copy link
Member

@roman3017

type                   16 bytes     64 bytes    256 bytes   1024 bytes     8192 bytes  16384 bytes
aes-256-cbc       1099.77k     2320.65k     3164.16k     3484.67k    3528.02k     3511.64k

:D

@roman3017
Copy link
Contributor Author

Very nice, more than 3x speedup.

@mithro
Copy link

mithro commented Nov 16, 2020

FYI - @bunnie @tcal-x

@Dolu1990
Copy link
Member

@roman3017 and in 256 XD

@roman3017
Copy link
Contributor Author

I see, so it is 4x speed up for aes-256-cbc. Here is performance with no acceleration for comparison:

type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes                              
aes-256-cbc        492.58k      700.22k      796.41k      831.49k      830.09k      832.81k                             

@Dolu1990
Copy link
Member

Dolu1990 commented Sep 9, 2022

just got some NaxRiscv number (64bits 2 alu 16 KB i$ 16 KB d$ in debian)=>

openssl speed -elapsed -evp aes-128-cbc aes-256-cbc
type             16 bytes     64 bytes    256 bytes   1024 bytes   8192 bytes  16384 bytes
aes-256-cbc       1399.56k     1659.83k     1744.20k     1764.95k     1771.76k     1769.04k
AES-128-CBC       1645.07k     2057.95k     2208.74k     2237.15k     2245.32k     2248.04k

@roman3017
Copy link
Contributor Author

Cool, that's really impressive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants