# FUNCTION

# Public

# ADD32 (POLY GG)

POLY: A polynom of degree 127 modulo N/2 (type POLY).
GG: A polynom of degree 32 modulo N/2 (type (unsigned-byte 32)).
DO: Adds the polynom GG to POLY.
RETURN: The modified POLY.

# DIVIDE32 (POLY GG)

POLY: A polynom of degree 127 modulo N/2 (type POLY).
GG: A polynom of degree 32 modulo N/2 (type (unsigned-byte 32)).
DO: Divides the polynom POLY by GG.
RETURN: POLY; the remainder (unsigned-byte 32)..

# EVEN-PARITY (BYTE)

RETURN: The BYTE with the parity bit set to even parity.

# INSERT-BIT7 (POLY)

POLY: A polynom of degree 127 modulo N/2 (type POLY).
DO: Inserts into the POLY a 7th bit that is the even parity of the lowest 7 bits.
RETURN: POLY

# MULTIPLY32 (POLY GG)

POLY: A polynom of degree 127 modulo N/2 (type POLY).
GG: A polynom of degree 32 modulo N/2 (type (unsigned-byte 32)).
DO: Multiplies the polynom POLY by GG.
RETURN: The modified POLY.

# ODD-PARITY (BYTE)

RETURN: The BYTE with the parity bit set to odd parity.

# POLY-FROM-BYTES (BYTES)

BYTES: A vector of at least 16 octets, in big endian order.
Only the 16 first octets are used.
RETURN: The poly stored in the bytes.

# POLY-PRIN1-TO-STRING (POLY)

POLY: A polynom of degree 127 modulo N/2 (type POLY).
RETURN: A string containing a human readable representation of the polynom POLY.
(it is of the form "x^M + … + x^m").

# POLY-TO-BYTES (POLY)

POLY: A polynom of degree 127 modulo N/2 (type POLY).
RETURN: A vector of 16 octets in big endian order encoding the polynom.

# REMAINDER32 (POLY GG)

POLY: A polynom of degree 127 modulo N/2 (type POLY).
GG: A polynom of degree 32 modulo N/2 (type (unsigned-byte 32)).
RETURN: the remainder (unsigned-byte 32) of POLY divided by GG.
NOTE: Doesn't modify POLY.

# REMOVE-BIT7 (POLY)

POLY: A polynom of degree 127 modulo N/2 (type POLY).
DO: Modifies POLY, removing the 7th bit.
RETURN: POLY

# Private

# Undocumented

# %DIVISION (POLY GG)

# VARIABLE

# Private

# *EVEN-PARITY*

A vector with all legal even-parity bytes, in 7-bit order.

# *ODD-PARITY*

A vector with all legal odd-parity bytes, in 7-bit order.