Coder Social home page Coder Social logo

kriskwiatkowski / nobs Goto Github PK

View Code? Open in Web Editor NEW
11.0 0.0 2.0 1.6 MB

Implementation of cryptographic primitives in Go

License: Other

Go 64.83% Makefile 0.38% Assembly 33.57% Python 1.21%
post-quantum-cryptography isogeny cryptography arm x86 csidh

nobs's People

Contributors

dependabot[bot] avatar ioerror avatar kriskwiatkowski avatar neuromncr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

nobs's Issues

DRBG: use hardware support for AES

using standard implementation of AES causes memory allocation.
I've a PoC which has SetKey operation, so that I don't need to do NewCipher in DRBG update. PoC lacks ARM and X86 hardware acceleration

drbg: strength is initialized before check?

Seems like a bug:

	// Minimum entropy input (SP800-90A, 10.2.1)
	if len(entropy) < int(c.strength/8) {
		return false
	}

	// Security strength for AES-256 as per SP800-57, 5.6.1
	c.strength = 256

sidh: it is possible to import wrong private key

Code doesn't check if imported key is exactly k-bits long (where k is a length of private key). In such case code will import the key, it will perform calculation, but those calculations will be wrong.

Reason is that implementation of ScalarMul3Pt() function assumes that first bit is set and if this is not a case, montgomery ladder is calculated wrongly

prep for Frodo & mKEM improv: api extraction

Frodo will use same KEM API as SIKE. currently that API is implemented directly in SIKE, but should be extracted and placed in the kem/ directory. That will also be useful for mKEM

Use RDRAND

On x86 there is RDSEED instruction available. Why not to use it...

Just as a side note: seems some library (i.e. boringssl) use it. bssl also has ctr-drbg

Use AES_CRT_DRBG for SIDH benchmarking

Currently SIDH/SIKE uses "crypto/rand" as a source of randomness - this is done even in benchmarking.
"crypto/rand" does weird mutexing when accessing randomness source. This may influence benchmark results.

SharedSecretSize vs KemSize

there are two fields SharedSecretSize and KEMSize and a function called SharedSecretSize which returns KEMSize.

That's probably a leftover from Round1

Build fails under i386, etc

build error log:

src/github.com/henrydcase/nobs/drbg/internal/aes/cipher_asm.go:15:6: missing function body
src/github.com/henrydcase/nobs/drbg/internal/aes/cipher_asm.go:18:6: missing function body
src/github.com/henrydcase/nobs/drbg/internal/aes/cipher_asm.go:21:6: missing function body

and another one:

src/github.com/henrydcase/nobs/dh/csidh/csidh.go:88:4: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:102:3: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:106:3: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:135:4: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:139:4: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:143:4: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:144:4: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:170:7: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:179:7: undefined: mul512
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:187:3: undefined: mulRdc
src/github.com/henrydcase/nobs/dh/csidh/csidh.go:187:3: too many errors

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.