Skip to content

SeaweedbrainCY/hash_lagrange_polynomial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Cryptographic hash function based on the Lagrange Polynomial

This repository hosts the code of a whole new cryptographic function, using the Lagrange Polynomial. A new hashing polynomial has been created by myself. The justification, and the explicit method is explained (in french) in the following paper : Study paper

⚠️ WARNING : This is NOT a secured cryptographic function.

No security proof has been made. It has been created in order to give an pratical and efficient example of what can be done with that method. This should not be used for other reason than study and absolutely not for security reasons.

Contributor(s) : @DevNathan (Nathan Stchepinsky)

GitHub Contributors Image

Licence

GPLv3 license

This code source is published under GPLv3 licence.

Copyright (C) 2021  Nathan Stchepinsky

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.

Usage

1 - Clone the project

Clone this project on your laptop by using this link or by executing the following command in your terminal :

git clone https://github.com/DevNathan/hash_lagrange_polynomial

2 - Hashing a message

from hash_lagrange import *

hash_len = 32 # Length of the produced hash (in char)

lagrange = Lagrange(hash_len)

message = "Hello world !"

hash_str = lagrange.hash(message)

3 - Output

Hashing "Hello world !" on 32 char.

🔒 Hash :  kk31q6ojgqeeihwfshzus1f1xxek84xa


** Sucessfuly hashed in  0.013  seconds **

You can see more example, including proof of the padding and the avalanche effect, in the study paper

Security issue

For security report or security issue, please contact me at [email protected].

PGP Key : https://keybase.io/devnath/pgp_keys.asc?fingerprint=8c7bae7de486c1b4441ed2e197881b1f87e35cf5