GithubHelp home page GithubHelp logo

jacobsa / crypto Goto Github PK

View Code? Open in Web Editor NEW
32.0 32.0 18.0 3.98 MB

Some Go cryptography routines that are not included in the Go standard library.

License: Apache License 2.0

C 5.87% Go 94.13%

crypto's People

Contributors

codelingobot avatar dchest avatar itiserik avatar ivajloip avatar jacobsa avatar mwhudson avatar radii avatar selvakn avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

crypto's Issues

Use reference implementation to generate test cases

RFC 4493 has a program for generating test data with a reference
implementation and hard-coded data. That can be cgo-wrapped into a program
that generates random keys (with a hard-coded seed) and then prints gobs with
test cases for various programs.

  • Command should be testing/gentests.
  • Structs defined in testing.
  • testing also exports functions that return the test data; finds the data
    using the source repo.

Add xorBlock for RISC-V architecture

The xorBlock function does not have support for RISC-V and thus software depending on crypto e.g. gocryptfs does not compile on RISC-V:

// +build amd64 arm64 ppc64 ppc64le s390x mips64 mips64le

Unfortunately, unaligned loads (which are used by the present xorBlock implementation) are implementation-defined behavior on RISC-V and should thus not be relied on (Section 2.6, "Load and Store Instructions" in the unprivileged ISA specification):

Loads and stores where the effective address is not naturally aligned to the referenced datatype (i.e., on a four-byte boundary for 32-bit accesses, and a two-byte boundary for 16-bit accesses) have behavior dependent on the EEI.

Maybe it makes sense to add a generic fallback implementation of the xorBlock function which does not make use of unaligned loads?

Alpine Linux downstream issue where this was originally reported: https://gitlab.alpinelinux.org/alpine/aports/-/issues/12793

AEAD wrapper

Hi there, I am about to use SIV in gocryptfs, thanks for the great work!

I'll write an AEAD wrapper for that, just wanted to ask if you are interested in having the wrapper upstream in your repo, otherwise I'll keep it in gocryptfs.

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.