You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+16-5Lines changed: 16 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@ Changes to minimum domain size and revised tweak length have been partially impl
15
15
16
16
## Requires
17
17
18
-
This project was built and tested with Python 3.7 and later versions. It requires the pycryptodome library:
18
+
This project was built and tested with Python 3.6 and later versions. It requires the pycryptodome library:
19
19
20
20
`pip3 install pycryptodome`
21
21
@@ -27,14 +27,25 @@ Install this project with pip:
27
27
28
28
## Usage
29
29
30
-
FF3 is a Feistel ciphers, and Feistel ciphers are initialized with a radix representing an alphabet. Practial radix limits of 36 in Java means the following radix values are typical:
30
+
FF3 is a Feistel ciphers, and Feistel ciphers are initialized with a radix representing an alphabet.
31
+
Practial radix limits of 36 in python means the following radix values are typical:
31
32
* radix 10: digits 0..9
32
33
* radix 26: alphabetic a-z
33
34
* radix 36: alphanumeric 0..9, a-z
34
35
35
-
Special characters and international character sets, such as those found in UTF-8, would require a larger radix, and are not supported.
36
+
Special characters and international character sets, such as those found in UTF-8, would require a larger radix, and are not supported.
37
+
Also, all elements in a plaintext string share the same radix. Thus, an identification number that consists of a letter followed
38
+
by 6 digits (e.g. A123456) cannot be correctly encrypted by FPE while preserving this convention.
36
39
37
-
It's important to note that, as with any cryptographic package, managing and protecting the key appropriately to your situation is crucial. This package does not provide any guarantees regarding the key in memory.
40
+
Input plaintext has maximum length restrictions based upon the chosen radix (2 * floor(96/log2(radix))):
41
+
* radix 10: 56
42
+
* radix 26: 40
43
+
* radix 36: 36
44
+
45
+
To work around string length, its possible to encode longer text in chunks.
46
+
47
+
As with any cryptographic package, managing and protecting the key(s) is crucial. The tweak is generally not kept secret.
0 commit comments