RFP 16: Bytes, cryptography and structured data for Daml, seeking feedback and a champion
- gopikannappanOP
I have a Development Fund proposal open for review: Bytes, Cryptography and Structured Data for Daml. I am building a shielded asset protocol and I need this library for its Daml verifier. The proposal is an Apache-2.0 Daml library plus a DPM component.
It primarily addresses RFP 16, Daml / Developer Usability Gaps, which explicitly names native bytes type support. It also addresses RFP 19, DPM components. I am asking for 300,000 CC over nine weeks: three milestones of three weeks at 100,000 CC each.
The PR has been open since 23 October with no review yet. Its status is Needs Champion. Under CIP-0100, an external proposal needs a Tech & Ops Committee champion. SIG membership alone does not qualify. Foundation DevRel suggested this RFP area and may be able to champion it after review. He is occupied with other work, so I am posting here.
Daml has no byte array type. Bytes from other systems use hex-encoded Text and three helpers:
packHexBytes,byteCountandisBytes32Hex. Every team writes the remaining operations itself.My scope covers byte operations, documented crypto wrappers, RLP encoding and decoding, binary Merkle and Ethereum Patricia trie proof verification. I include documentation, external test vectors, a worked example and a usability-gap report for the Daml team.
I measured the following in a working proof of concept. The
DA.Crypto.Textbuiltins work inside a choice body. The documentation does not say so, and every published example uses Daml Script. A malformed DER signature aborts the transaction; a well-formed but incorrect signature returnsFalse.secp256k1re-hashes the message with SHA-256 before verification. Ethereum-style verification over a keccak digest needssecp256k1WithEcdsaOnly, which takes a digest.My RLP encoder passes all 28 official vectors in
ethereum/tests, atRLPTests/rlptest.json. Signature verification passes 8 of 8 assertions against Project Wycheproof vectors fromC2SP/wycheproof, usingecdsa_secp256k1_sha256_test.json, executed inside a choice body. Mykeccak256output matches Foundry’scast keccakbyte for byte.The proof-of-concept repository is private today. I will publish it under Apache-2.0 in Milestone 1 and can give the Foundation access sooner on request.
I have seen the Ed25519 on-ledger verification topic here, plus older topics on secp256k1 support and a keccak hash function in Daml.
I would appreciate:
- Feedback on whether the scope is the right shape and what is missing.
- A pointer to anyone already building this, so I do not duplicate it.
- A pointer to a Tech & Ops Committee member who might champion it.