- Aug 05, 2023
-
-
kdockser authored
-
kdockser authored
Update date and revision
-
Rafael Sene authored
Signed-off-by:Rafael Sene <rafael@riscv.org>
-
- Aug 04, 2023
-
-
kdockser authored
Added more clarity to when the mask is not subject to DIEL.
-
Nicolas Brunie authored
* minor fixes (vbrev in zvkb list) + zvksed in DIEL * typo in riscv-crypto-vector-zvkt.adoc Signed-off-by:
Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com> * Update vbrev.adoc Signed-off-by:
Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com> * Update riscv-crypto-vector-zvkb.adoc Signed-off-by:
Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com> --------- Signed-off-by:
Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>
-
kdockser authored
Removing Zvkb from the "Included in". vbrev.v is a general purpose instruction and is not needed for our crypto instructions.
-
Nicolas Brunie authored
* fixing typo Zvkc -> Zvknc in vclmul* * fixing extension list for vrev8
-
Nicolas Brunie authored
-
kdockser authored
Cleaned up and updated "Included in at bottom of pages" Added a new extension Zvkb for Vector Cryptography Bit-Manipulation This is a proper subset of Zvbb and only includes the instructions needed for cryptography Updated Zvkt to say that DIEL doesn't apply to constants included in the instruction encoding such as immediate values and the zero register.
-
- Jul 07, 2023
-
-
Eric Gouriou authored
As discovered by @shakakao and reported by @nibrunieAtSi5 (see https://github.com/riscv/riscv-crypto/issues/331), the Zvbc-based GHASH logic incorrectly relies on vxor to leave masked-off lanes undisturbed even though it sets the vector state with a mask agnostic policy. The fix is to use ", mu" to request masked-off elements to be undisturbed. I did check all proof-of-concept tests in an environment where masked-off elements get overwritten when "ma" is in effect. Prior to those fixes only the 'aes-gcm-test' fails, and all pass with those fixes. Fixes: https://github.com/riscv/riscv-crypto/issues/331 Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
- Jul 04, 2023
-
-
Nicolas Brunie authored
Signed-off-by:Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>
-
Nicolas Brunie authored
Signed-off-by:Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com> `Zvkb` replaced with `Zvbb` and `Zvbc`
-
- Jun 21, 2023
-
-
kdockser authored
The document is now frozen and ready for public review.
-
- Jun 17, 2023
-
-
Krste Asanovic authored
Clarify that vwsll zero-extends the vs2 operand
-
Andrew Waterman authored
This follows from the SAIL code and arguably from the instruction's mnemonic, but make it explicit for readers' benefit.
-
- Jun 14, 2023
-
-
Ken Dockser authored
Fix typo in riscv-crypto-vector-element-groups.adoc
-
- Jun 05, 2023
-
-
Fei Yang authored
-
- Jun 01, 2023
- May 18, 2023
-
-
Ken Dockser authored
fixing vctz vd description
-
Ken Dockser authored
Update vaese128.adoc
-
- May 16, 2023
-
-
Xavier Esteve authored
Honestly the smallest typo but I figure why not propose the change. vd is used in place of vs2 when describing the purpose of the register (storing plain text). Signed-off-by:Xavier Esteve <xjesteve@gmail.com>
-
Nicolas Brunie authored
Signed-off-by:Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>
-
- May 13, 2023
-
-
kdockser authored
Fixed email address of editor
-
- May 10, 2023
-
-
Ken Dockser authored
Zvk code samples / Proof of Concept (v2)
-
kdockser authored
Bumping the rev and date.
-
kdockser authored
At the recommendation of the ARC, we have removed carryless multiply from the list of extensions included in Zvkn and Zvks. We recommendation that Zvbc is implemented in RISC-V Vector designs as it enables implementation of CRC and elliptic curve cryptography.
-
- May 02, 2023
-
-
Eric Gouriou authored
The sm4-test.c file contains a set of functions verifying and showcasing usage of instructions implementing SM4 algorithm (see [1]) defined by the Zvksed extension (see [2]). Pre-requisites: - riscv64-linux-gnu toolchain available in PATH. - Zvksed-enabled binutils-gdb available in PATH overriding the above toolchain. - Zvksed-enabled Spike available in PATH. - RISC-V Proxy kernel (riscv-pk) compiled and available in ~/RISC-V/riscv64-linux-gnu/bin/pk (can be overridden with PK make variable). The default make target will compile all examples and run them in Spike simulator. Example make invocation: # Build and run Zvksed tests with default parameters make run-sm4 # Override riscv-pk location make run-sm4 PK=/opt/prefix/riscv64-linux-gnu/bin/pk # Override target triplet and riscv-pk location make run-sm4 TARGET=riscv64-unknown-linux-gnu \ PK=/opt/prefix/riscv64-linux-gnu/bin/pk Make targets: - sm4-test - compiles the PoC code. - run-sm4 - Executes the compiled binary in Spike. - clean - Cleans the build artifacts. Make variables: - TARGET - Target triplet to use. By default riscv64-linux-gnu. - PK - Location of the riscv-pk binary. By default it's ~/RISC-V/$(TARGET)/bin/pk See Makefile for more details. [1] https://datatracker.ietf.org/doc/html/draft-ribose-cfrg-sm4-10 [2] https://github.com/riscv/riscv-crypto/releases Signed-off-by:Albert Jakieła <aja@semihalf.com> Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
Eric Gouriou authored
The sm3-test.c file contains a set of functions verifying and showcasing usage of instructions implementing SM3 algorithm (see [1]) defined by the Zvksh extension (see [2]). Pre-requisites: - riscv64-linux-gnu toolchain available in PATH. - Zvksh-enabled binutils-gdb available in PATH overriding the above toolchain. - Zvksh-enabled Spike available in PATH. - RISC-V Proxy kernel (riscv-pk) compiled and available in ~/RISC-V/riscv64-linux-gnu/bin/pk (can be overridden with PK make variable). The default make target will compile all examples and run them in Spike simulator. Example make invocation: # Build and run Zvksh tests with default parameters make run-sm3 # Override riscv-pk location make run-sm3 PK=/opt/prefix/riscv64-linux-gnu/bin/pk # Override target triplet and riscv-pk location make run-sm3 TARGET=riscv64-unknown-linux-gnu \ PK=/opt/prefix/riscv64-linux-gnu/bin/pk Make targets: - sm3-test - compiles the PoC code. - run-sm3 - Executes the compiled binary in Spike. - clean - Cleans the build artifacts. Make variables: - TARGET - Target triplet to use. By default riscv64-linux-gnu. - PK - Location of the riscv-pk binary. By default it's ~/RISC-V/$(TARGET)/bin/pk See Makefile for more details. [1] https://datatracker.ietf.org/doc/html/draft-oscca-cfrg-sm3-00 [2] https://github.com/riscv/riscv-crypto/releases Signed-off-by:Eric Gouriou <ego@rivosinc.com> Signed-off-by:
Albert Jakieła <aja@semihalf.com> Signed-off-by:
Kornel Duleba <mindal@semihalf.com> Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
Eric Gouriou authored
The sha-test.c file contains a set of functions verifying and showcasing usage of instructions defined by the Zvknha/Zvknhb extensions to implement the SHA-128 and SHA-256 algorithm routines. Pre-requisites: - riscv64-linux-gnu toolchain available in PATH. - zvknh[ab]-enabled binutils-gdb available in PATH overriding the above toolchain. - zvknh[ab]-enabled Spike available in PATH. - RISC-V Proxy kernel (riscv-pk) compiled and available in ~/RISC-V/riscv64-linux-gnu/bin/pk (can be overridden with PK make variable). The default make target will compile all examples and run them in Spike simulator. Example make invocation: # Build and run zvknh[ab] tests with default parameters make run-sha # Override riscv-pk location make run-sha PK=/opt/prefix/riscv64-linux-gnu/bin/pk # Override target triplet and riscv-pk location make run-sha TARGET=riscv64-unknown-linux-gnu \ PK=/opt/prefix/riscv64-linux-gnu/bin/pk Make targets: - sha-test - compiles the PoC code. - run-sha - Executes the compiled binary in Spike. - clean - Cleans the build artifacts. Make variables: - TARGET - Target triplet to use. By default riscv64-linux-gnu. - PK - Location of the riscv-pk binary. By default it's ~/RISC-V/$(TARGET)/bin/pk See Makefile for more details. Signed-off-by:Kornel Dulęba <mindal@semihalf.com> Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
Eric Gouriou authored
The GHASH part of AES-GCM is now run twice using instructions from Zvb* and Zvkg extensions and then compared to ensure result validity. Pre-requisites: - riscv64-linux-gnu toolchain available in PATH. - Zvkg-enabled binutils-gdb available in PATH overriding the above toolchain. - Zvkg-enabled Spike available in PATH. - RISC-V Proxy kernel (riscv-pk) compiled and available in ~/RISC-V/riscv64-linux-gnu/bin/pk (can be overridden with PK make variable). The default make target will compile all examples and run them in Spike simulator. Example make invocation: # Build and run Zvkns+Zvkg tests with default parameters make run-aes-gcm # Override riscv-pk location make run-aes-gcm PK=/opt/prefix/riscv64-linux-gnu/bin/pk # Override target triplet and riscv-pk location make run-aes-gcm TARGET=riscv64-unknown-linux-gnu \ PK=/opt/prefix/riscv64-linux-gnu/bin/pk Make targets: - aes-gcm-test - compiles the PoC code. - run-aes-gcm - Executes the compiled binary in Spike. - clean - Cleans the build artifacts. Make variables: - TARGET - Target triplet to use. By default riscv64-linux-gnu. - PK - Location of the riscv-pk binary. By default it's ~/RISC-V/$(TARGET)/bin/pk See Makefile for more details. Signed-off-by:Eric Gouriou <ego@rivosinc.com> Signed-off-by:
Kornel Duleba <mindal@semihalf.com>
-
Eric Gouriou authored
The aes-gcm-test.c file contains a set of functions verifying and showcasing usage of instructions defined by the Zvkned and Zvbb/Zvbc extensions to implement AES-GCM algorithm routines. Pre-requisites: - riscv64-linux-gnu toolchain available in PATH. - zvkned, zvbb, and zvbc enabled binutils-gdb available in PATH overriding the above toolchain. - zvkned, zvbb, and zbbc enabled Spike available in PATH. - RISC-V Proxy kernel (riscv-pk) compiled and available in ~/RISC-V/riscv64-linux-gnu/bin/pk (can be overridden with PK make variable). The default make target will compile all examples and run them in Spike simulator. Example make invocation: # Build and run aes-gcm-test with default parameters make run-aes-gcm # Override riscv-pk location make run-aes-gcm PK=/opt/prefix/riscv64-linux-gnu/bin/pk # Override target triplet and riscv-pk location make run-aes-gcm TARGET=riscv64-unknown-linux-gnu \ PK=/opt/prefix/riscv64-linux-gnu/bin/pk Make targets: - aes-gcm-test - compiles the PoC code. - run-aes-gcm - Executes the compiled binary in Spike. - clean - Cleans the build artifacts. Make variables: - TARGET - Target triplet to use. By default riscv64-linux-gnu. - PK - Location of the riscv-pk binary. By default it's ~/RISC-V/$(TARGET)/bin/pk See Makefile for more details. Signed-off-by:Kornel Dulęba <mindal@semihalf.com> Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
Eric Gouriou authored
The aes-cbc-test.c file contains a set of functions verifying and showcasing usage of instructions defined by the Zvkned extension to implement the AES-CBC algorithm routines. Pre-requisites: - riscv64-linux-gnu toolchain available in PATH. - Zvkned-enabled binutils-gdb available in PATH overriding the above toolchain. - Zvkned-enabled Spike available in PATH. - RISC-V Proxy kernel (riscv-pk) compiled and available in ~/RISC-V/riscv64-linux-gnu/bin/pk (can be overridden with PK make variable). The default make target will compile all examples and run them in Spike simulator. Example make invocation: # Build and run Zvkned tests with default parameters make run-aes-cbc # Override riscv-pk location make run-aes-cbc PK=/opt/prefix/riscv64-linux-gnu/bin/pk # Override target triplet and riscv-pk location make run-aes-cbc TARGET=riscv64-unknown-linux-gnu \ PK=/opt/prefix/riscv64-linux-gnu/bin/pk Make targets: - aes-cbc-test - compiles the PoC code. - run-aes-cbc - Executes the compiled binary in Spike. - clean - Cleans the build artifacts. Make variables: - TARGET - Target triplet to use. By default riscv64-linux-gnu. - PK - Location of the riscv-pk binary. By default it's ~/RISC-V/$(TARGET)/bin/pk See Makefile for more details. Signed-off-by:Kornel Dulęba <mindal@semihalf.com> Signed-off-by:
Stanislaw Kardach <kda@semihalf.com> Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
Eric Gouriou authored
The zvbc-test.c file contains a set of functions verifying and showcasing usage of instructions defined by the Zvbc extension. Pre-requisites: - riscv64-linux-gnu toolchain available in PATH. - Zvbc-enabled binutils-gdb available in PATH overriding the above toolchain. - Zvbc-enabled Spike available in PATH. - RISC-V Proxy kernel (riscv-pk) compiled and available in ~/RISC-V/riscv64-linux-gnu/bin/pk (can be overridden with PK make variable). The default make target will compile all examples and run them in Spike simulator. Example make invocation: # Build and run Zvbc tests with default parameters make run-zvbc # Override riscv-pk location make run-zvbc PK=/opt/prefix/riscv64-linux-gnu/bin/pk # Override target triplet and riscv-pk location make run-zvbc TARGET=riscv64-unknown-linux-gnu \ PK=/opt/prefix/riscv64-linux-gnu/bin/pk Make targets: - zvbc-test - compiles the PoC code. - run-zvbc - Executes the compiled binary in Spike. - clean - Cleans the build artifacts. Make variables: - TARGET - Target triplet to use. By default riscv64-linux-gnu. - PK - Location of the riscv-pk binary. By default it's ~/RISC-V/$(TARGET)/bin/pk See Makefile for more details. Signed-off-by:Stanislaw Kardach <kda@semihalf.com> Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
Eric Gouriou authored
The zvbb-test.c file contains a set of functions verifying and showcasing usage of instructions defined by the Zvbb extension. Pre-requisites: - riscv64-linux-gnu toolchain available in PATH. - Zvbb-enabled binutils-gdb available in PATH overriding the above toolchain. - Zvbb-enabled Spike available in PATH. - RISC-V Proxy kernel (riscv-pk) compiled and available in ~/RISC-V/riscv64-linux-gnu/bin/pk (can be overridden with PK make variable). The default make target will compile all examples and run them in Spike simulator. Example make invocation: # Build and run Zvbb tests with default parameters make run-zvbb # Override riscv-pk location make run-zvbb PK=/opt/prefix/riscv64-linux-gnu/bin/pk # Override target triplet and riscv-pk location make run-zvbb TARGET=riscv64-unknown-linux-gnu \ PK=/opt/prefix/riscv64-linux-gnu/bin/pk Make targets: - zvbb-test - compiles the PoC code. - run-zvbb - Executes the compiled binary in Spike. - clean - Cleans the build artifacts. Make variables: - TARGET - Target triplet to use. By default riscv64-linux-gnu. - PK - Location of the riscv-pk binary. By default it's ~/RISC-V/$(TARGET)/bin/pk See Makefile for more details. Signed-off-by:Stanislaw Kardach <kda@semihalf.com> Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
Eric Gouriou authored
Parse the text files with test vectors and generate C headers that can later be used by a test framework. NIST KAT test vectors are used to provide ample coverage. For now parsing of AES-CBC, AES-GCM, SHA-128 and SHA-256 is supported. Signed-off-by:
Eric Gouriou <ego@rivosinc.com> Signed-off-by:
Kornel Dulęba <mindal@semihalf.com> Signed-off-by:
Eric Gouriou <ego@rivosinc.com>
-
- Apr 26, 2023
-
-
kdockser authored
-
Ken Dockser authored
[#318] making explicit in pseudo code than 5-bit imm for vwsll.vi is unsigned
-
- Apr 25, 2023
-
-
Nicolas Brunie authored
Signed-off-by:Nicolas Brunie <82109999+nibrunieAtSi5@users.noreply.github.com>
-
kdockser authored
Bumping the rev number to 0.9
-