Finite Field Arithmetic - Arithmetic Example (where The Characteristic Is Not 2)

Arithmetic Example (where The Characteristic Is Not 2)

Addition: (A + B) mod Characteristic
Subtraction: (A - B) mod Characteristic
Multiplication: (A * B) mod Characteristic

This code is vulnerable to timing attacks when used for cryptography.

Read more about this topic:  Finite Field Arithmetic

Famous quotes containing the word arithmetic:

    I hope I may claim in the present work to have made it probable that the laws of arithmetic are analytic judgments and consequently a priori. Arithmetic thus becomes simply a development of logic, and every proposition of arithmetic a law of logic, albeit a derivative one. To apply arithmetic in the physical sciences is to bring logic to bear on observed facts; calculation becomes deduction.
    Gottlob Frege (1848–1925)