{"_id":"@eecc/rsa-rdfc-2025-cryptosuite","name":"@eecc/rsa-rdfc-2025-cryptosuite","dist-tags":{"latest":"1.0.1"},"versions":{"1.0.1":{"name":"@eecc/rsa-rdfc-2025-cryptosuite","version":"1.0.1","description":"An RSA-RDFC-2025 Data Integrity cryptosuite for use with jsonld-signatures.","homepage":"https://github.com/european-epc-competence-center/rsa-rdfc-2025-cryptosuite","repository":{"type":"git","url":"git+https://github.com/european-epc-competence-center/rsa-rdfc-2025-cryptosuite.git"},"license":"BSD-3-Clause","author":{"name":"European EPC Competence Center GmbH"},"type":"module","exports":"./lib/index.js","browser":{"crypto":false,"./lib/sha.js":"./lib/sha-browser.js"},"dependencies":{"@eecc/rsa-multikey":"^1.0.2","jsonld":"^8.3.1","rdf-canonize":"^4.0.1"},"devDependencies":{"@digitalbazaar/data-integrity":"^2.3.0","@digitalbazaar/data-integrity-context":"^2.0.0","@digitalbazaar/did-method-key":"^5.2.0","@digitalbazaar/multikey-context":"^2.0.1","@digitalbazaar/security-document-loader":"^3.0.0","c8":"^7.11.3","chai":"^4.3.6","cross-env":"^7.0.3","did-io":"^0.8.3","eslint":"^8.53.0","eslint-config-digitalbazaar":"^5.0.1","eslint-plugin-jsdoc":"^50.2.2","eslint-plugin-unicorn":"^55.0.0","jsonld-signatures":"^11.2.1","mocha":"^10.0.0","mocha-lcov-reporter":"^1.3.0"},"engines":{"node":">=18"},"scripts":{"test":"npm run test-node","test-node":"cross-env NODE_ENV=test mocha --preserve-symlinks -t 30000 -A -R ${REPORTER:-spec} --require test/test-mocha.js test/*.spec.js","coverage":"cross-env NODE_ENV=test c8 npm run test-node","coverage-ci":"cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node","coverage-report":"c8 report","lint":"eslint .","release":"node scripts/release.js"},"c8":{"reporter":["lcov","text-summary","text"]},"_id":"@eecc/rsa-rdfc-2025-cryptosuite@1.0.1","gitHead":"e8790d119e6b2990768a437d658ff7f67276ee17","bugs":{"url":"https://github.com/european-epc-competence-center/rsa-rdfc-2025-cryptosuite/issues"},"_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-qJotVlZBaFbxPWX/T0M5LlEWsesCV5js8ps09ceXyGGzvVV1xwJqnpVGw0fQFmmWGUsVYjtsRZJgDNuYqOw6Ng==","shasum":"aa0061cf10b76042145678f23d991d1ae709f71e","tarball":"https://registry.npmjs.org/@eecc/rsa-rdfc-2025-cryptosuite/-/rsa-rdfc-2025-cryptosuite-1.0.1.tgz","fileCount":10,"unpackedSize":13526,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICahlKfU2l2hFy2rnWp4OCUetwBSjjV0wH02/VFqxv7HAiBSoRF5N3MUoVx1CCBUSHVx8rN7J9J9vSapwm8Ph1KSEw=="}]},"_npmUser":{"name":"eecc","email":"christian.fries@eecc.de"},"directories":{},"maintainers":[{"name":"eecc","email":"christian.fries@eecc.de"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rsa-rdfc-2025-cryptosuite_1.0.1_1765793134937_0.12362128326060873"},"_hasShrinkwrap":false}},"time":{"created":"2025-12-15T10:05:34.856Z","1.0.1":"2025-12-15T10:05:35.086Z","modified":"2025-12-15T10:05:35.349Z"},"maintainers":[{"name":"eecc","email":"christian.fries@eecc.de"}],"description":"An RSA-RDFC-2025 Data Integrity cryptosuite for use with jsonld-signatures.","homepage":"https://github.com/european-epc-competence-center/rsa-rdfc-2025-cryptosuite","repository":{"type":"git","url":"git+https://github.com/european-epc-competence-center/rsa-rdfc-2025-cryptosuite.git"},"author":{"name":"European EPC Competence Center GmbH"},"bugs":{"url":"https://github.com/european-epc-competence-center/rsa-rdfc-2025-cryptosuite/issues"},"license":"BSD-3-Clause","readme":"# RSA RDFC 2025 Data Integrity Cryptosuite _(@eecc/rsa-rdfc-2025-cryptosuite)_\n\n> RSA RDFC 2025 Data Integrity Cryptosuite for use with jsonld-signatures compatible with digitalbazaar DataIntegrityProof\n\n## ⚠️ Warning\n\n**This cryptosuite (`rsa-rdfc-2025`) is NOT standardized.** It is an experimental implementation based on the ECDSA RDFC 2019 cryptosuite pattern, adapted for RSA keys using PS256 (RSA-PSS with SHA-256). Use at your own risk and be aware that:\n\n- The specification may change without notice\n- It should not be used in production systems without careful consideration\n\n## Table of Contents\n\n- [RSA RDFC 2025 Data Integrity Cryptosuite _(@eecc/rsa-rdfc-2025-cryptosuite)_](#rsa-rdfc-2025-data-integrity-cryptosuite-eeccrsa-rdfc-2025-cryptosuite)\n  - [⚠️ Warning](#️-warning)\n  - [Table of Contents](#table-of-contents)\n  - [Background](#background)\n  - [Security](#security)\n  - [Install](#install)\n  - [Usage](#usage)\n  - [Contribute](#contribute)\n  - [License](#license)\n\n## Background\n\nFor use with https://github.com/digitalbazaar/jsonld-signatures v11.0 and above.\n\nThis cryptosuite implements RSA-PSS with SHA-256 (PS256) for Data Integrity proofs,\ncompatible with the [rsa-multikey](https://github.com/european-epc-competence-center/rsa-multikey)\nlibrary and with [digitalbazaar DataIntegrityProof](https://github.com/digitalbazaar/data-integrity).\n\nSee also related specs:\n\n* [Verifiable Credential Data Integrity](https://w3c.github.io/vc-data-integrity/)\n\n## Security\n\nTBD\n\n## Install\n\n- Browsers and Node.js 18+ are supported.\n\nTo install from NPM:\n\n```\nnpm install @eecc/rsa-rdfc-2025-cryptosuite\n```\n\nTo install locally (for development):\n\n```\ngit clone https://github.com/european-epc-competence-center/rsa-rdfc-2025-cryptosuite.git\ncd rsa-rdfc-2025-cryptosuite\nnpm install\n```\n\n## Usage\n\nThe following code snippet provides a complete example of digitally signing\na verifiable credential using this library:\n\n```javascript\nimport * as RsaMultikey from '@eecc/rsa-multikey';\nimport {DataIntegrityProof} from '@digitalbazaar/data-integrity';\nimport {cryptosuite as rsaRdfc2025Cryptosuite} from\n  '@eecc/rsa-rdfc-2025-cryptosuite';\nimport jsigs from 'jsonld-signatures';\nconst {purposes: {AssertionProofPurpose}} = jsigs;\n\n\n// create the unsigned credential\nconst unsignedCredential = {\n  '@context': [\n    'https://www.w3.org/2018/credentials/v1',\n    {\n      AlumniCredential: 'https://schema.org#AlumniCredential',\n      alumniOf: 'https://schema.org#alumniOf'\n    }\n  ],\n  id: 'http://example.edu/credentials/1872',\n  type: [ 'VerifiableCredential', 'AlumniCredential' ],\n  issuer: 'https://example.edu/issuers/565049',\n  issuanceDate: '2010-01-01T19:23:24Z',\n  credentialSubject: {\n    id: 'https://example.edu/students/alice',\n    alumniOf: 'Example University'\n  }\n};\n\n// create the keypair to use when signing\nconst controller = 'https://example.edu/issuers/565049';\nconst keyPair = await RsaMultikey.generate({\n  controller,\n  modulusLength: 2048 // or 3072, 4096\n});\n\n// export public key and add to document loader\nconst publicKey = await keyPair.export({publicKey: true, includeContext: true});\naddDocumentToLoader({url: publicKey.id, document: publicKey});\n\n// create key's controller document\nconst controllerDoc = {\n  '@context': [\n    'https://www.w3.org/ns/did/v1',\n    'https://w3id.org/security/multikey/v1'\n  ],\n  id: controller,\n  assertionMethod: [publicKey]\n};\naddDocumentToLoader({url: controllerDoc.id, document: controllerDoc});\n\n// create suite\nconst suite = new DataIntegrityProof({\n  signer: keyPair.signer(), cryptosuite: rsaRdfc2025Cryptosuite\n});\n\n// create signed credential\nconst signedCredential = await jsigs.sign(unsignedCredential, {\n  suite,\n  purpose: new AssertionProofPurpose(),\n  documentLoader\n});\n\n// results in the following signed VC\n{\n  \"@context\": [\n    \"https://www.w3.org/2018/credentials/v1\",\n    {\n      \"AlumniCredential\": \"https://schema.org#AlumniCredential\",\n      \"alumniOf\": \"https://schema.org#alumniOf\"\n    },\n    \"https://w3id.org/security/data-integrity/v2\"\n  ],\n  \"id\": \"http://example.edu/credentials/1872\",\n  \"type\": [\n    \"VerifiableCredential\",\n    \"AlumniCredential\"\n  ],\n  \"issuer\": \"https://example.edu/issuers/565049\",\n  \"issuanceDate\": \"2010-01-01T19:23:24Z\",\n  \"credentialSubject\": {\n    \"id\": \"https://example.edu/students/alice\",\n    \"alumniOf\": \"Example University\"\n  },\n  \"proof\": {\n    \"type\": \"DataIntegrityProof\",\n    \"created\": \"2023-03-01T21:29:24Z\",\n    \"verificationMethod\": \"https://example.edu/issuers/565049#<multibase-public-key>\",\n    \"cryptosuite\": \"rsa-rdfc-2025\",\n    \"proofPurpose\": \"assertionMethod\",\n    \"proofValue\": \"<multibase-signature>\"\n  }\n}\n```\n\n## Contribute\n\nPRs accepted.\n\nIf editing the Readme, please conform to the\n[standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\n[New BSD License (3-clause)](LICENSE) © 2025 European EPC Competence Center GmbH\n\n","readmeFilename":"README.md","_rev":"1-9ee8b1621f99ee05cee35a63a3060bc6"}