ProductPromotion
Logo

Elixir

made by https://0x3d.site

GitHub - alisinabh/ntru_elixir: a NIF for libntru. NTRU is a post quantum cryptography algorithm.
a NIF for libntru. NTRU is a post quantum cryptography algorithm. - alisinabh/ntru_elixir
Visit Site

GitHub - alisinabh/ntru_elixir: a NIF for libntru. NTRU is a post quantum cryptography algorithm.

GitHub - alisinabh/ntru_elixir: a NIF for libntru. NTRU is a post quantum cryptography algorithm.

NtruElixir

Build Status Coverage Status

A wrapper around libntru using NIFs.

WARNING: This is a work in progress and shall not be used in production projects yet.

What is NTRU?

NTRU is a patented and open source public-key cryptosystem that uses lattice-based cryptography to encrypt and decrypt data. It consists of two algorithms: NTRUEncrypt, which is used for encryption, and NTRUSign, which is used for digital signatures. Unlike other popular public-key cryptosystems, it is resistant to attacks using Shor's algorithm and its performance has been shown to be significantly better

More on Wikipedia

Installation

Add :ntru_elixir to your deps.

def deps do
  [
    {:ntru_elixir, "~> 0.0.0"}
  ]
end

Documentation

Please visit hexdocs.pm/ntru_elixir for complete documentations.

Creating KeyPairs

In NTRU each private key can have multiple public keys. However to decrypt the encrypted data the same public key which data was encrypted with is necessarry.

To Create a KeyPair:

NtruElixir.generate_key_pair(pub_count, ntru_params(optional))
{:ok,
 [%NtruElixir.KeyPair{ntru_params: :NTRU_DEFAULT_PARAMS_128_BITS,
   priv_key: <<...>>,
   pub_key: <<...>>}, ...]}

Note that if you specify pub_count you will get multiple KeyPair structs.

Encrypting

Binaries can be encrypted with a keypair having the public key

NtruElixir.encrypt(key_pair, binary_to_encrypt)
{:ok, encrypted_binary}

Decrypting

Encrypted binaries can be decrypted with a keypair having BOTH public key and private key. Note that the public key should be the same as encryption public key.

NtruElixir.decrypt(key_pair, binary_to_decrypt)
{:ok, decrypted_binary}

License

The ntru_elixir project is licensed under GNU GPLv3 however it uses another libraries with different licenses.

libntru is licensed under BSD-3-Clause

Articles
to learn more about the elixir concepts.

Resources
which are currently available to browse on.

mail [email protected] to add your project or resources here 🔥.

FAQ's
to know more about the topic.

mail [email protected] to add your project or resources here 🔥.

Queries
or most google FAQ's about Elixir.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory