aboutsummaryrefslogtreecommitdiff
path: root/gf28.h
blob: 2f3401ba76edb3362a7687c5e60757964ee214e4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <iostream>
#include <cstdint>

//The GF(2^8) field used in AES
//Elements are represented by unsigned 8-bit ints, as is their nature.
//Since addition in GF(2^8) is more simply written as just '^', only
//multiplication and taking inverses is necessary to implement separately.

namespace GF28 {

	uint8_t multiply(uint8_t x,uint8_t y);
	uint8_t inverse(uint8_t value);

}