GithubHelp home page GithubHelp logo

0ng / format-preserving-encryption Goto Github PK

View Code? Open in Web Editor NEW
43.0 11.0 30.0 25 KB

FPE Implementation in C [Preparing for improvement]

License: MIT License

C 79.00% Makefile 2.22% Python 18.79%
format-preserving-encryption fpe

format-preserving-encryption's People

Contributors

0ng avatar trivialfis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

format-preserving-encryption's Issues

radix 62 and 95 not supported ?

Hi,

When I tried radix 62 and radix 95, i get the below error. Is it not supported ?

I added the below test case under AES-256 in test.py

[
95,
"2B7E151628AED2A6ABF7158809CF4F3CEF4359D8D580AA4F7F036D6F04FC6A94",
"3737373770717273373737",
"0123456789abcdefghi",
"xs8a0azh2avyalyzuwd",
],

ERROR: on executing test.py

Traceback (most recent call last):
File "test.py", line 234, in
main()
File "test.py", line 198, in main
results = regexp.findall(output.decode('utf-8'))[0]
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa6 in position 318: invalid start byte

Not an issue, actually

I just wanted to let you know that I have used some of your test vectors to verify my C-implementation of the FPE algorithms. Of course I have mentioned the source and credit. Please feel free to check out the testvectors folder of this repository and inform me of any issues.

Cheers

HEAP CORRUPTION DETECTED

I've compiled the example and src using Visual Studio 2010 and linked to the openssl static library.

I'm getting this error while stepping through the example.cpp (I changed the files to cpp so they will compile with VS 2010) file.
The error happened at line 196 (OPENSSL_free(Bytes);) in ff1.cpp.

Any idea what caused this?

Compile Error fixed - BASE62 Radix Possible?

Hello, I was hoping to test your FPE in C, I downloaded the files, (running debian mx linux) ensured libraries up to date, installed openssl, installed updated make and gcc, uncompressed files in /home/testing directory.

Next, I ran $: make example, and this built the makefile as downloaded.

when I try to run example, I get command not found.

Looking at example.c it looks like I need 4 arguments after the program name

<key>: the encryption key, in hexadecimal format.
<tweak>: the tweak value, in hexadecimal format. This can be an empty string if not needed.
<radix>: the radix used in the encryption scheme. This should be an integer between 2 and 36.
<plaintext>: the plaintext to be encrypted, in string format.

so it looks like i must type something like "example 5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a5a "" 10 1234567890"

This is not working either. Can you help me on how to test this code? (test.py ran ok)

also can this code be altered to allow Base62 radix?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.