iPXE
x25519_multiply_step2 Union Reference

X25519 multiplication step 2 result. More...

## Public Member Functions

bigint_t (bigint_required_size((260+7)/8)+bigint_required_size((6+7)/8))
Raw product. More...

parts

## Detailed Description

X25519 multiplication step 2 result.

Step 2 of X25519 multiplication is to multiply the high-order 260 bits from step 1 with the 6-bit reduction constant 38, and to add this to the low-order 256 bits from step 1.

The multiplication inputs are limited to 260 and 6 bits respectively, and so the product will have at most 266 bits. After adding the low-order 256 bits from step 1, the result will have at most 267 bits.

Definition at line 144 of file x25519.c.

## ◆ bigint_t()

 x25519_multiply_step2::bigint_t ( bigint_required_size((260+7)/8)+bigint_required_size((6+7)/8) )
inline

Raw product.

Big integer multiplication produces a result with a number of elements equal to the sum of the number of elements in each input.Partition into low-order and high-order bits

```   Reduction modulo p requires separating the low-order 256
bits from the remaining high-order bits.

Since the value will never exceed 267 bits (see above),
there will be at most 11 high-order bits.
```

Low-order 256 bits

High-order 11 bits

Definition at line 151 of file x25519.c.

167  {
168  /** Low-order 256 bits */
169  bigint_t ( bigint_required_size ( ( 256 /* bits */ + 7 ) / 8 ) )
170  low_256bit;
171  /** High-order 11 bits */
172  bigint_t ( bigint_required_size ( ( 11 /* bits */ + 7 ) / 8 ) )
173  high_11bit;
174  } __attribute__ (( packed )) parts;
bigint_t(bigint_required_size((260+7)/8)+bigint_required_size((6+7)/8))
Raw product.
Definition: x25519.c:151
A 16-bit general register.
Definition: registers.h:24
#define bigint_required_size(len)
Determine number of elements required for a big-integer type.
Definition: bigint.h:30

References bigint_required_size.

## ◆ parts

 x25519_multiply_step2::parts

Definition at line 174 of file x25519.c.

Referenced by x25519_multiply().

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