Skip to content

cl3nn0/NTRU

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NTRU

NTRUEncrypt module in Python3


Requirements

pip3 install pycryptodome

Class attribute

  • Polynomial

    • _coeff

    • _N


  • NTRUKey

    • _P

      parameter set

    • _h

      public key

    • _f

      private key

    • _g

      private key

    • _fp

    • _fq


Functions

  • NTRUEncrypt.generate_key(params)

    • return NTRUKey entity , default params are Standard_Security

    • params support

      • NTRUEncrypt.Moderate_Security()

      • NTRUEncrypt.Standard_Security()

      • NTRUEncrypt.Highest_Security()


  • NTRUEncrypt.import_key(file)

    • return NTRUKey entity according to file

For NTRUKey

  • NTRUKey.encrypt(m)

    • return ciphertext (Type bytes)

    • type of m should be bytes


  • NTRUKey.encrypt_to_poly(m)

    • return ciphertext (Type list)

    • type of m should be bytes


  • NTRUKey.decrypt(e)

    • return plaintext (Type bytes)

    • type of e should be bytes


  • NTRUKey.decrypt_from_poly(e)

    • return plaintext (Type bytes)

    • type of e should be list


  • NTRUKey.export_public_key(file)

    • export Parameters and polynomial h to file

  • NTRUKey.export_private_key(file)

    • export Parameters , polynomial h , polynomial f and polynomial g to file

Reference

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors