8000 Shorter names, and consistency for instructions with immediate operands · Issue #46 · riscv/riscv-crypto · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Shorter names, and consistency for instructions with immediate operands #46
Closed
@grnewell

Description

@grnewell

I suggest using shorter names where possible and where it's still a useful mnemonic. Also, I believe we should always indicate in the name if the instruction has an immediate operand by having an "i" suffix. Considering both of these recommendations and the earlier recommendations to delete the "s: prefix and remove dots in dissimilar instructions, I suggest renaming the following instructions:

(change "enc" to "e" and "dec" to "d" for brevity)

  • saes32.encs --> aes32esi (AES RV32 encrypt: sub-bytes, immediate)

  • saes32.encsm --> aes32esmi (AES RV32 encrypt: sub-bytes + mix-columns, immediate)

  • saes32.decs --> aes32dsi (AES RV32 decrypt: sub-bytes, immediate)

  • saes32.decsm --> aes32dsmi (AES RV32 decrypt: sub-bytes + mix-columns, immediate)

  • saes64.sk1 --> aes64ks1i (AES RV64 key-schedule "one" [sub-bytes, rotate, immediate round-constant])

  • saes64.ks2 --> aes64ks2 (AES RV64 key-schedule "two" [XOR summation])

  • saes64.imix --> aes64im (AES RV64 inverse-mix-columns)

  • saes64.encsm --> aes64esm (AES RV64 encrypt shift-rows, sub-bytes, mix-columns)

  • saes64.encs --> aes64es (AES RV64 encrypt shift-rows, sub-bytes)

  • saes64.decsm --> aes64dsm (AES RV64 decrypt shift-rows, sub-bytes, mix-columns)

  • saes64.ceds --> aes64ds (AES RV64 decrypt shift-rows, sub-bytes)
    (Should we also get rid of the "32" and "64" in these instruction names? The few resulting collisions could easily be disambiguated)

  • ssha256.sig0 --> sha256sig0 (SHA256 "sigma-zero" function) (both RV32 and RV64)

  • ssha256.sig1 --> sha256sig1 (SHA256 "sigma-one" function) (")

  • ssha256.sum0 --> sha256sum0 (SHA256 "sum-zero" function) (")

  • ssha256.sum1 --> sha256sum0 (SHA256 "sum-one" function) (")

  • ssha512.sum0r --> sha512sum0r (SHA512 "sum-zero" function w/ rotate) (RV32 only)

  • ssha512.sum1r --> sha512sum0r (SHA512 "sum-one" function w/ rotate) (")

  • ssha512.sig0l --> sha512sig0l (SHA512 "sigma-zero" function, low) (")

  • ssha512.sig0h --> sha512sig0h (SHA512 "sigma-zero" function, high) (")

  • ssha512.sig1l --> sha512sig1l (SHA512 "sigma-one" function, low) (")

  • ssha512.sig1h --> sha512sig1h (SHA512 "sigma-one" function, high) (")

  • ssha512.sum0 --> sha512sum0r (SHA512 "sum-zero" function) (RV64 only)

  • ssha512.sum1 --> sha512sum0r (SHA512 "sum-one" function) (")

  • ssha512.sig0 --> sha512sig0h (SHA512 "sigma-zero" function) (")

  • ssha512.sig1 --> sha512sig1l (SHA512 "sigma-one" function) (")

  • ssm3.p0 --> sm3p0 (SM3 "p-zero" function) (both RV32 and RV64)

  • ssm3.p1 --> sm3p1 (SM3 "p-one" function (")
    ssm4.ed --> sm4ed (SM4 encrypt-decrypt) (")
    ssm4.ks --> sm4ks (SM4 key-schedule) (")

  • pollentropy --> pollentropyi (both RV32 and RV64)
    (Should this be shortened? Twelve characters seems excessive)

Metadata

Metadata

Assignees

No one assigned

    Labels

    specificationImprovements or additions to the specification

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0