iPXE
Data Fields
x25519_multiply_workspace Union Reference

X25519 multiplication temporary working space. More...

Data Fields

struct {
   uint8_t   pad [sizeof(union
      x25519_multiply_step2)
      - offsetof(union
      x25519_multiply_step1,
      parts.high_260bit)]
 Padding to avoid collision between steps 1 and 2. More...
 
   union x25519_multiply_step1   step1
 Step 1 result. More...
 
}; 
 Step 1 result. More...
 
struct {
   union x25519_multiply_step2   step2
 Step 2 result. More...
 
   union x25519_multiply_step3   step3
 Step 3 result. More...
 
}; 
 Steps 2 and 3 results. More...
 

Detailed Description

X25519 multiplication temporary working space.

We overlap the buffers used by each step of the multiplication calculation to reduce the total stack space required:

|-----------------------------------------------------—| | <- pad -> | <---------— step 1 result ----------—> | | | <- low 256 bits -> | <– high 260 bits --> | | <----— step 2 result ---—> | <– step 3 result --> | |-----------------------------------------------------—|

Definition at line 216 of file x25519.c.

Field Documentation

◆ pad

uint8_t x25519_multiply_workspace::pad[sizeof(union x25519_multiply_step2) - offsetof(union x25519_multiply_step1, parts.high_260bit)]

Padding to avoid collision between steps 1 and 2.

The step 2 multiplication consumes the high 260 bits of step 1, and so the step 2 multiplication result must not overlap this portion of the step 1 result.

Definition at line 228 of file x25519.c.

◆ step1

union x25519_multiply_step1 x25519_multiply_workspace::step1

Step 1 result.

Definition at line 230 of file x25519.c.

◆ @435

struct { ... }

Step 1 result.

◆ step2

union x25519_multiply_step2 x25519_multiply_workspace::step2

Step 2 result.

Definition at line 235 of file x25519.c.

◆ step3

union x25519_multiply_step3 x25519_multiply_workspace::step3

Step 3 result.

Definition at line 237 of file x25519.c.

◆ @437

struct { ... }

Steps 2 and 3 results.


The documentation for this union was generated from the following file: