Giter VIP home page Giter VIP logo

go-hpke's People

Contributors

bifurcation avatar chris-wood avatar cjpatton avatar dmcardle avatar rozbb 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

go-hpke's Issues

Missing zero checks in DH operation in X448, P-256, and P-521

Section 7.1.3 states that DH results MUST be rejected if they are the point at infinity. Currently (including the current PR), this check is only implemented for X25519. There should be a similar check for X448 and the NIST curves.

A suggestion for the P-curves: I actually don't explicitly check for the point at infinity in rust-hpke. Instead, I mandate that all private keys be in the range (0,p-1] (a pretty standard requirement), and that received pubkeys not be the point at infinity (already mandated by the spec). The combination of these two requirements means that sk * pk cannot be the point at infinity, since pk has order p and sk is not 0 mod p.

AEAD seq shouldn't be a uint64

This is a small nit, but the seq field in the AEAD should not be fixed to 64 bits, as below

go-hpke/hpke.go

Line 192 in 0928fb5

seq uint64

Rather, it should a bytestring with size equal to that of the AEAD's nonce. XChaCha20, for example, has 24-byte nonces, which are not representable with any primitive integer type.

Open question: does the seq increment function have to be constant-time? I do not have a constant-time implementation right now.

dependency causes installation to fail

go/pkg/mod/github.com/cisco/[email protected]/crypto.go:21:2: git.schwanenlied.me/yawning/[email protected]: invalid version: git ls-remote -q origin in /home/death0wl/go/pkg/mod/cache/vcs/d9b12d3a5fa86608789556217f10340cc43314718f3c9753275330d0225984cc: exit status 128:
	fatal: unable to look up git.schwanenlied.me (port 9418) (Name or service not known)

Serialization logic for decryption context?

Hi there,

I'm working on a prototype of the Encrypted ClientHello (ECH) extension for TLS and plan to use this implementation of HPKE. The deployment will outsource decryption operations to an RPC server: the RPC request will contain the payload of the ECH extension; and the RPC response will contain the decrypted inner CH. Alternatively, the RPC request might contain the encapsulated key only, and the response might contain the decryption context. This significantly reduces overhead, since the complete ciphertext and plaintext don't need to be transmitted.

I'd like to implement this alternative RPC, but the current implementation of HPKE doesn't support serialization of the decryption context. Would you consider a PR that adds support for this functionality?

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.