EccCommandReg

Type Alias EccCommandReg 

Source
pub type EccCommandReg = RegValueT<EccCommandReg_SPEC>;
Expand description

Command register

Aliased Type§

pub struct EccCommandReg { /* private fields */ }

Implementations§

Source§

impl EccCommandReg

Source

pub fn ecc_calcr2(self) -> RegisterFieldBool<31, 1, 0, EccCommandReg_SPEC, RW>

This bit indicates if the IP has to calculate R mod N for the next operation. This bit must be set to 1 when a new prime number has been programmed. This bit is automatically cleared when R mod N has been calculated. ‘0’: no effect ‘1’: forces the IP to re-calculate R mod N

Source

pub fn ecc_signb(self) -> RegisterFieldBool<30, 1, 0, EccCommandReg_SPEC, RW>

Sign of parameter B in equation y2=x3+Ax+B ‘0’: B is positive ‘1’: B is negative

Source

pub fn ecc_signa(self) -> RegisterFieldBool<29, 1, 0, EccCommandReg_SPEC, RW>

Sign of parameter A in equation y2=x3+Ax+B ‘0’: A is positive ‘1’: A is negative

Source

pub fn ecc_sizeofoperands( self, ) -> RegisterField<8, 0xff, 1, 0, u8, u8, EccCommandReg_SPEC, RW>

This field defines the size (= number of 64-bit double words) of the operands for the current operation. Possible values are limited by the generic parameter g_Log2MaxDataSize that defines the max space allocated or reserved to each operand.

Arbitrary Data/Key size from 128 up to 2566 are supported: 0x02 (02d) -> 128-bit Data/Key size 0x03 (02d) -> 256-bit Data/Key size ECC-ECDSA - Prime Field F(p) 0x03 -> 192-bit (Curve P-192) 0x04 -> 256-bit (Curves P-224 & P-256) ECC-ECDSA - Binary Field F(2m) 0x03 -> 192-bit (Curve K-163) 0x04 -> 256-bit (Curve K-233)

  • 4 Xers: 0x01, 0x02, 0x4, 0x6 -> 64, 128 & multiples of 128 bits
Source

pub fn ecc_field(self) -> RegisterFieldBool<7, 1, 0, EccCommandReg_SPEC, RW>

‘0’: Field is F(p) ‘1’: Field is F(2m)

Source

pub fn ecc_typeoperation( self, ) -> RegisterField<0, 0x7f, 1, 0, u8, u8, EccCommandReg_SPEC, RW>

Primitive Arithmetic Operations F(p) & F(2m) [6:4] = 0x0 [3:0] = 0x0 -> Reserved 0x1 -> Modular Addition 0x2 -> Modular Subtraction 0x3 -> Modular Multiplication (Odd N) 0x4 -> Modular Reduction (Odd N) 0x5 -> Modular Division (Odd N) 0x6 -> Modular Inversion (Odd N) 0x7 -> Reserved 0x8 -> Multiplication 0x9 -> Modular Inversion (Even N) 0xA -> Modular Reduction (Even N) others -> Reserved C = A + B mod N C = A - B mod N C = A * B mod N C = B mod N C = A/B mod N C = 1/B mod N C = A * B C = 1/B mod N C = B mod N High-level RSA, CRT & DSA Operations - F(p) only ([7] forced to 0) [6:4] = 0x1 [3:0] = 0x0 -> MulModN 0x1 -> MulAddN 0x2 -> ECMQV (part1) others -> Reserved

Primitive ECC & Check Point Operations F(p) & F(2m) [6:4] = 0x2 [3:0] = 0x0 -> Point Doubling (Projective Coord.) 0x1 -> ptAdd3 0x2 -> GenSessionKey 0x3 -> Check_AB (ECDSA) 0x4 -> Check_n (ECDSA) 0x5 -> Check single value less than N 0x6 -> Check_Point_On_Curve 0x7-> Reserved 0x8 -> Curve25519 point multiplication 0x9 -> Ed25519 Check point on curve 0xA -> Ed25519 ScalarMult 0xB -> Ed25519 CheckValid others -> Reserved

High-level ECC ECDSA Operations F(p) & F(2m) [6:4] = 0x3 [3:0] = 0x0 -> ECMQV (part 2) 0x1 -> Verify ZKP 0x2 -> ECDSA Domain Parameters Validation others -> Reserved

[6:4]=0x4, 0x5, 0x6, 0x7 -> Reserved

Trait Implementations§

Source§

impl Default for EccCommandReg

Source§

fn default() -> EccCommandReg

Returns the “default value” for a type. Read more