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

Vector SHA2 Mock SAIL code. #23

Closed
6 of 8 tasks
ben-marshall opened this issue Aug 3, 2020 · 1 comment
Closed
6 of 8 tasks

Vector SHA2 Mock SAIL code. #23

ben-marshall opened this issue Aug 3, 2020 · 1 comment
Assignees
Labels
help wanted Extra attention is needed SAIL Anything to do with the SAIL formal model. specification Improvements or additions to the specification

Comments

@ben-marshall
Copy link
Member

ben-marshall commented Aug 3, 2020

Write pseudo-code descriptions of the vector SHA2 instructions. Because there is no support for the base vector extension, these functions assume that extraction of input elements from the vector registers is a solved problem and that they are just passed in as arguments. The mocked functions just return the result for a single set of elements. They do not change any architectural state.

  • SHA256 Utility functions: sig/sum/ch/maj
  • SHA512 Utility functions: sig/sum/ch/maj
  • Single Round Message SHA256
  • Single Round Working State SHA256
  • Single Round Message SHA512
  • Single Round Working State SHA512
  • All Round SHA256.
  • All Round SHA512.
@ben-marshall ben-marshall added the specification Improvements or additions to the specification label Aug 3, 2020
@ben-marshall ben-marshall changed the title Vector SHA2 Pseudo code. Vector SHA2 Mock SAIL code. Aug 13, 2020
@ben-marshall ben-marshall added help wanted Extra attention is needed SAIL Anything to do with the SAIL formal model. labels Aug 13, 2020
ben-marshall added a commit that referenced this issue Aug 14, 2020
- See #23, #26

 On branch dev/next-release
 Your branch is ahead of 'origin/dev/next-release' by 5 commits.
   (use "git push" to publish your local commits)

 Changes to be committed:
	new file:   sail/riscv_insts_crypto_rvv_sha.sail

 Changes not staged for commit:
	modified:   bin/parse_opcodes.py
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)

 Untracked files:
	sail/riscv_insts_crypto_rvv_aes.sail
	sail/riscv_insts_crypto_rvv_alu.sail
@ben-marshall ben-marshall self-assigned this Aug 19, 2020
@ben-marshall ben-marshall mentioned this issue Aug 19, 2020
21 tasks
ben-marshall added a commit that referenced this issue Aug 27, 2020
- Change the rotate functions used by crypto to take integer arguments for
  the rotation amounds rather than bit vectors. Allows nicer expression of
  constant values.

- Start work on SHA2 vector implementations. See #23

 On branch dev/next-release
 Your branch is up-to-date with 'origin/dev/next-release'.

 Changes to be committed:
	modified:   sail/riscv_insts_crypto.sail
	modified:   sail/riscv_insts_crypto_rv64.sail
	modified:   sail/riscv_insts_crypto_rvv_aes.sail
	modified:   sail/riscv_insts_crypto_rvv_sha.sail
	modified:   sail/riscv_types_crypto.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
ben-marshall added a commit that referenced this issue Sep 1, 2020
- Add SHA512 Message schedule and 16-round functions.

 On branch dev/next-release
 Your branch is up-to-date with 'origin/dev/next-release'.

 Changes to be committed:
	modified:   sail/riscv_insts_crypto_rvv_sha.sail

 Changes not staged for commit:
	modified:   extern/riscv-gnu-toolchain (modified content)
	modified:   extern/riscv-isa-sim (modified content)
@kdockser
Copy link
Collaborator

The SHA-2 instructions have been address using SAIL-like code. That will need to do for now until there is SAIL support for RISC-V vectors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed SAIL Anything to do with the SAIL formal model. specification Improvements or additions to the specification
Projects
None yet
Development

No branches or pull requests

2 participants