Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 2.46 KB

kip-0004.md

File metadata and controls

50 lines (31 loc) · 2.46 KB
KIP Title Author Status Type Category Created
4
Pact On-Chain Decryption Primitives
Stuart Popejoy @slpopejoy, Kenneth Schiller @kenadia, Arjun Baokar @arjunbaokar
Final
Standard
Pact
2019-06-14

Abstract

Proposal is to add two new operations as built-ins:

  • validate-keypair to match up a public key with a private key for some scheme(s)
  • decrypt to decrypt ciphertext to plaintext using a keypair for some scheme(s)

Considerations:

  • Use noise-protocol--endorsed configurations only. Initial proposal would be DH 25519 with AESGCM following all configuration recos such as nonce size, etc.

  • Supporting more than one configuration, ie RSA, ED 448. Preference is to start with just configuration above and introduce overloaded versions later as needed.

NOTE: final implementation has the following Pact functions added as of version 3.1.0. Discussion is in #5

Motivation

This is a first step toward supporting different kinds of cryptographic commitments which someday could also include Petersen commitments etc.

In the current use-case the commitment concept is presented through the storage of the components of the private key which is itself encrypted and stored. The essence of the commitment IMO is the presence of some history that would then be revealed in a challenge process where that which is decrypted has already been "asserted to" on the blockchain through whatever public signatures were enforced at storage time and thereby memorialized.

At some point we would look to make these datatypes in Pact proper but this simply seeks to enable an initial workflow.

Backwards Compatibility

New functions generally do not cause backward-compatibility issues in Pact.

3.1.0 predates Chainweb launch so no backward-compatibility issues in Chainweb.

Specification

See KIP discussion in #5 as well as Pact PR #564 for actual implementation.

References