summaryrefslogtreecommitdiff
path: root/python/constants.py
diff options
context:
space:
mode:
authorKévin Le Gouguec <kevin.legouguec@airbus.com>2019-03-21 16:04:16 +0100
committerKévin Le Gouguec <kevin.legouguec@airbus.com>2019-03-21 16:04:16 +0100
commitaaf0d2c49f343e909dc69b487056ca31238ffabf (patch)
tree9e054a390aad0be8f2acec8a77de3a7e97d881ba /python/constants.py
parent57952a7dd9d9c586dcac84e46987d15d49674774 (diff)
downloadlilliput-ae-implem-aaf0d2c49f343e909dc69b487056ca31238ffabf.tar.xz
[implem-python] Nettoyage PEP8
- espaces avant ':' - espaces en trop après ',' - parenthèses dans les if - levée d'exception plutôt que 'return None' implicite Simplification de genkat_aead.py grâce à l'exception levée par le module.
Diffstat (limited to 'python/constants.py')
-rw-r--r--python/constants.py66
1 files changed, 34 insertions, 32 deletions
diff --git a/python/constants.py b/python/constants.py
index 764febb..c61dfe0 100644
--- a/python/constants.py
+++ b/python/constants.py
@@ -3,35 +3,37 @@ BLOCK_BYTES = BLOCK_BITS//8
NONCE_BYTES = 15
-Sbox = [32, 0, 178, 133, 59, 53, 166, 164,
- 48, 228, 106, 44, 255, 89, 226, 14,
- 248, 30, 122, 128, 21, 189, 62, 177,
- 232, 243, 162, 194, 218, 81, 42, 16,
- 33, 1, 35, 120, 92, 36, 39, 181,
- 55, 199, 43, 31, 174, 10, 119, 95,
- 111, 9, 157, 129, 4, 90, 41, 220,
- 57, 156, 5, 87, 151, 116, 121, 23,
- 68, 198, 230, 233, 221, 65, 242, 138,
- 84, 202, 110, 74, 225, 173, 182, 136,
- 28, 152, 126, 206, 99, 73, 58, 93,
- 12, 239, 246, 52, 86, 37, 46, 214,
- 103, 117, 85, 118, 184, 210, 97, 217,
- 113, 139, 205, 11, 114, 108, 49, 75,
- 105, 253, 123, 109, 96, 60, 47, 98,
- 63, 34, 115, 19, 201, 130, 127, 83,
- 50, 18, 160, 124, 2, 135, 132, 134,
- 147, 78, 104, 70, 141, 195, 219, 236,
- 155, 183, 137, 146, 167, 190, 61, 216,
- 234, 80, 145, 241, 51, 56, 224, 169,
- 163, 131, 161, 27, 207, 6, 149, 7,
- 158, 237, 185, 245, 76, 192, 244, 45,
- 22, 250, 180, 3, 38, 179, 144, 79,
- 171, 101, 252, 254, 20, 247, 227, 148,
- 238, 172, 140, 26, 222, 203, 40, 64,
- 125, 200, 196, 72, 107, 223, 165, 82,
- 229, 251, 215, 100, 249, 240, 211, 94,
- 102, 150, 143, 29, 69, 54, 204, 197,
- 77, 159, 191, 15, 209, 8, 235, 67,
- 66, 25, 231, 153, 168, 142, 88, 193,
- 154, 212, 24, 71, 170, 175, 188, 91,
- 213, 17, 208, 176, 112, 187, 13, 186]
+Sbox = [
+ 0x20, 0x00, 0xb2, 0x85, 0x3b, 0x35, 0xa6, 0xa4,
+ 0x30, 0xe4, 0x6a, 0x2c, 0xff, 0x59, 0xe2, 0x0e,
+ 0xf8, 0x1e, 0x7a, 0x80, 0x15, 0xbd, 0x3e, 0xb1,
+ 0xe8, 0xf3, 0xa2, 0xc2, 0xda, 0x51, 0x2a, 0x10,
+ 0x21, 0x01, 0x23, 0x78, 0x5c, 0x24, 0x27, 0xb5,
+ 0x37, 0xc7, 0x2b, 0x1f, 0xae, 0x0a, 0x77, 0x5f,
+ 0x6f, 0x09, 0x9d, 0x81, 0x04, 0x5a, 0x29, 0xdc,
+ 0x39, 0x9c, 0x05, 0x57, 0x97, 0x74, 0x79, 0x17,
+ 0x44, 0xc6, 0xe6, 0xe9, 0xdd, 0x41, 0xf2, 0x8a,
+ 0x54, 0xca, 0x6e, 0x4a, 0xe1, 0xad, 0xb6, 0x88,
+ 0x1c, 0x98, 0x7e, 0xce, 0x63, 0x49, 0x3a, 0x5d,
+ 0x0c, 0xef, 0xf6, 0x34, 0x56, 0x25, 0x2e, 0xd6,
+ 0x67, 0x75, 0x55, 0x76, 0xb8, 0xd2, 0x61, 0xd9,
+ 0x71, 0x8b, 0xcd, 0x0b, 0x72, 0x6c, 0x31, 0x4b,
+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