Bug 1007 - implement chacha20 in svp64 assembler
Summary: implement chacha20 in svp64 assembler
Status: RESOLVED FIXED
Alias: None
Product: Libre-SOC's first SoC
Classification: Unclassified
Component: Source Code (show other bugs)
Version: unspecified
Hardware: Other Linux
: --- enhancement
Assignee: Konstantinos Margaritis (markos)
URL:
Depends on: 965
Blocks:
  Show dependency treegraph
 
Reported: 2023-02-23 12:24 GMT by Luke Kenneth Casson Leighton
Modified: 2023-09-24 09:48 BST (History)
1 user (show)

See Also:
NLnet milestone: NLnet.2021.02A.052.CryptoRouter
total budget (EUR) for completion of task and all subtasks: 1500
budget (EUR) for this task, excluding subtasks' budget: 1500
parent task for budget allocation: 773
child tasks for budget allocation:
The table of payments (in EUR) for this task; TOML format:
markos={amount=1100, submitted=2023-04-27,paid=2023-05-13} lkcl={amount=400, submitted=2023-03-25,paid=2023-04-26}


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luke Kenneth Casson Leighton 2023-02-23 12:24:58 GMT
whilst the unit test ran the core algorithm it is still
necessary to create a full standalone assembler implementation
of chacha20.
Comment 1 Konstantinos Margaritis (markos) 2023-03-12 22:50:36 GMT
First working version of xchacha_hchacha20() function, thanks to Luke for making vertical-first usage clear!

https://git.libre-soc.org/?p=openpower-isa.git;a=blob;f=crypto/chacha20/src/xchacha20_svp64.s;h=4b5ce6e39504730481b4e8a846d32ac4bab6cc9c;hb=99bcb26563d29bbd36ac9d08d003ab1345850e46

Now, xchacha_encrypt_bytes() is left, but the main loop is the same, the rest should be easy to implement.
Comment 2 Konstantinos Margaritis (markos) 2023-03-12 22:51:57 GMT
$ SILENCELOG=1 ./test-chacha20
.
(lots of stuff printed)
.
.
Cryptographic tests passed
Comment 4 Luke Kenneth Casson Leighton 2023-03-25 10:04:35 GMT
apologies i made some alterations to setvl which had to result in
changes to use of setvl

https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=e2a35a34cfa1dd685ec8f1c64f0bf08783fef568

https://git.libre-soc.org/?p=openpower-isa.git;a=commitdiff;h=f41ef7748e7b365bc4e0f9be784f2fae375ce0be