From 701b9c836da4b3bcc98d601a62e2a80e9c792bd0 Mon Sep 17 00:00:00 2001 From: "Ethan L. Miller" Date: Mon, 7 Aug 2023 13:46:10 -0700 Subject: [PATCH] Added field sizes of 6 and 64 bits --- galois.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/galois.py b/galois.py index 73f09ab..65535af 100755 --- a/galois.py +++ b/galois.py @@ -115,8 +115,8 @@ class GaloisFieldLog: There only needs to be one instantiation of the field for a given set of parameters, but elements from different field instances with the same parameters may be mixed. ''' - field_widths = (4, 8, 12, 16) - poly_defaults = {4: 0x13, 8: 0x11d, 12:0x1053, 16: 0x1100b} + field_widths = (4, 6, 8, 12, 16) + poly_defaults = {4: 0x13, 6: 0x43, 8: 0x11d, 12:0x1053, 16: 0x1100b} multiply_test_size = 10000 def __init__ (self, bits, primitive_polynomial = None, repr_prefix = 'G', alpha = 1): ''' @@ -192,8 +192,8 @@ class GaloisFieldDirect: There only needs to be one instantiation of the field for a given set of parameters, but elements from different field instances with the same parameters may be mixed. ''' - field_widths = (4, 8, 12, 16, 32) - poly_defaults = {4: 0x13, 8: 0x11d, 12:0x1053, 16: 0x1100b, 32: 0x1000000c5} + field_widths = (4, 6, 8, 12, 16, 32, 64) + poly_defaults = {4: 0x13, 6: 0x43, 8: 0x11d, 12:0x1053, 16: 0x1100b, 32: 0x1000000c5, 64: 0x1000000000000001b} max_test_size = 5000 def __init__ (self, bits, primitive_polynomial = None, repr_prefix = 'G', alpha = 1): '''