Security News
cURL Project and Go Security Teams Reject CVSS as Broken
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
@transmute/cose
Advanced tools
npm install '@transmute/cose'
import cose from '@transmute/cose'
const cose = require('@transmute/cose')
const signed_inclusion_proof = await cose.merkle.inclusion_proof({
alg: signer.alg,
kid: log_id,
leaf_index: 2,
leaves,
signer,
})
18( / COSE Single Signer Data Object /
[
h'a2012604...6d706c65', / Protected header /
{ / Unprotected header /
100: [ / Inclusion proofs (2) /
h'83040282...1f487bb1', / Inclusion proof 1 /
h'83040382...1f487bb1', / Inclusion proof 2 /
]
},
h'', / Payload /
h'efde9a59...b4cb142b' / Signature /
]
)
{ / Protected header /
1: -7, / Cryptographic algorithm to use /
4: h'68747470...6d706c65' / Key identifier /
}
[ / Inclusion proof 1 /
4, / Tree size /
2, / Leaf index /
[ / Inclusion hashes (2) /
h'a39655d4...d29a968a' / Intermediate hash 1 /
h'57187dff...1f487bb1' / Intermediate hash 2 /
]
]
[ / Inclusion proof 2 /
4, / Tree size /
3, / Leaf index /
[ / Inclusion hashes (2) /
h'e7f16481...aab81688' / Intermediate hash 1 /
h'57187dff...1f487bb1' / Intermediate hash 2 /
]
]
See also :
import cose from '@transmute/cose'
const signer = await cose.signer({
privateKeyJwk: {
kty: 'EC',
crv: 'P-256',
alg: 'ES256',
d: 'o_95vWSheg19YU7viU3PmW_kRIWk14HiVLXDXiZjEL0',
x: 'LYdh0ITBGLOUpywy0adFxXyaIaQapIEOLgfw7933TRE',
y: 'I6R3hgQZf2topOWa0VBjEugRgHISJ39LvOlfVX29P0w',
},
})
const verifier = await cose.verifier({
publicKeyJwk: {
kty: 'EC',
crv: 'P-256',
alg: 'ES256',
x: 'LYdh0ITBGLOUpywy0adFxXyaIaQapIEOLgfw7933TRE',
y: 'I6R3hgQZf2topOWa0VBjEugRgHISJ39LvOlfVX29P0w',
},
})
const message0 = cose.cbor.encode(0)
const message1 = cose.cbor.encode('1')
const message2 = cose.cbor.encode([2, 2])
const message3 = cose.cbor.encode({ 3: 3 })
const entries = [message0, message1, message2, message3]
const leaves = entries.map(cose.merkle.leaf)
const old_root = await cose.merkle.root({ leaves })
const signed_inclusion_proof = await cose.merkle.inclusion_proof({
leaf_index: 2,
leaves,
signer,
})
const verified_inclusion_proof = await cose.merkle.verify_inclusion_proof({
leaf: cose.merkle.leaf(entries[2]),
signed_inclusion_proof,
verifier,
})
const verified3 = await cose.merkle.verify_multiple(
{
leaves: [cose.merkle.leaf(entries[2]), cose.merkle.leaf(entries[3])],
signed_inclusion_proof: updated,
verifier
}
)
const message4 = cose.cbor.encode(['🔥', 4])
const message5 = cose.cbor.encode({ five: '💀' })
const leaves2 = entries.map(cose.merkle.leaf)
const signed_consistency_proof = await cose.merkle.consistency_proof({
signed_inclusion_proof,
leaves: leaves2,
signer,
})
const verified = await cose.merkle.verify_consistency_proof({
old_root,
signed_consistency_proof,
verifier,
})
npm i
npm t
npm run lint
npm run build
FAQs
COSE and related work.
The npm package @transmute/cose receives a total of 9 weekly downloads. As such, @transmute/cose popularity was classified as not popular.
We found that @transmute/cose demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.
Security News
Biden's executive order pushes for AI-driven cybersecurity, software supply chain transparency, and stronger protections for federal and open source systems.