nums

package module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 25, 2022 License: ISC Imports: 3 Imported by: 0

README

NUMS

ISC License GitHub downloads GoDoc Go Report Card GitHub release (latest by date)

Microsoft Nothing Up My Sleeve Elliptic curves

NUMS (Nothing Up My Sleeve) curves, which are supported in the MSRElliptic Curve Cryptography Library (a.k.a. MSR ECCLib).

These curves are elliptic curves over a prime field, just like the NIST or Brainpool curves. However, the domain-parameters are choosen using a VERY TIGHT DESIGN SPACE to ensure, that the introduction of a backdoor is infeasable. For a desired size of s bits the prime p is choosen as p = 2^s - c with the smallest c where c>0 and p mod 4 = 3 and p being prime.

Usage

Usage of nums:
  -dec
        Decrypt with Private key
  -derive
        Derive shared secret key
  -enc
        Encrypt with Public key
  -key string
        Private/Public key
  -keygen
        Generate keypair
  -pub string
        Remote's side Public key
  -sign
        Sign with Private key
  -signature string
        Signature
  -verify
        Verify with Public key

Examples

Asymmetric keypair generation:
./nums -keygen 
Digital signature (ECDSA):
./nums -sign -key $prvkey < file.ext > sign.txt
sign=$(cat sign.txt)
./nums -verify -key $pubkey -signature $sign < file.ext
Asymmetric encryption:
./nums -enc -key $pubkey < file.ext > file.enc
./nums -dec -key $prvkey < file.enc
Shared key agreement (ECDH):
./nums -derive -key $prvkey -pub $pubkey

License

This project is licensed under the ISC License.

Documentation

Overview

Parameters for the Microsoft Nothing Up My Sleeve Elliptic curves

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func P256

func P256() elliptic.Curve

func P512

func P512() elliptic.Curve

Types

This section is empty.

Directories

Path Synopsis
cmd
nums
Nothing Up My Sleeve Elliptic curve NUMSP512d1 Digital Signer/Diffie-Hellman/Crypter
Nothing Up My Sleeve Elliptic curve NUMSP512d1 Digital Signer/Diffie-Hellman/Crypter

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL