
Security News
Free Certified Patch for Critical Rails Active Storage Vulnerability
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.
node-asn1 is a library for encoding and decoding ASN.1 datatypes in pure JS. Currently BER encoding is supported; at some point I'll likely have to do DER.
Mostly, if you're actually needing to read and write ASN.1, you probably don't need this readme to explain what and why. If you have no idea what ASN.1 is, see this: ftp://ftp.rsa.com/pub/pkcs/ascii/layman.asc
The source is pretty much self-explanatory, and has read/write methods for the common types out there.
The following reads an ASN.1 sequence with a boolean.
var Ber = require('asn1').Ber;
var reader = new Ber.Reader(Buffer.from([0x30, 0x03, 0x01, 0x01, 0xff]));
reader.readSequence();
console.log('Sequence len: ' + reader.length);
if (reader.peek() === Ber.Boolean)
console.log(reader.readBoolean());
The following generates the same payload as above.
var Ber = require('asn1').Ber;
var writer = new Ber.Writer();
writer.startSequence();
writer.writeBoolean(true);
writer.endSequence();
console.log(writer.buffer);
npm install asn1
MIT.
asn1.js is a similar package that provides a comprehensive set of tools for ASN.1 parsing and serialization in JavaScript. It allows for both DER and BER encoding and is often used in cryptographic operations. It is similar to asn1 but may offer a different API and additional features for handling ASN.1 data structures.
node-forge is a JavaScript library that includes various cryptography tools, including ASN.1 parsing and serialization. While it offers a broader range of cryptographic functions, its ASN.1 capabilities are similar to those of the asn1 package. It differs in that it is part of a larger suite of cryptographic tools rather than being focused solely on ASN.1.
pkijs is a pure JavaScript library that provides the means to work with the Public Key Infrastructure (PKI) built on Web Cryptography API. It includes ASN.1 parsing and serialization as part of its feature set. It is more specialized for PKI operations compared to asn1, which is a general-purpose ASN.1 library.
FAQs
Contains parsers and serializers for ASN.1 (currently BER only)
The npm package asn1 receives a total of 0 weekly downloads. As such, asn1 popularity was classified as not popular.
We found that asn1 demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 12 open source maintainers collaborating on the project.

Security News
Socket has released a free Certified Patch for a critical Rails Active Storage vulnerability, giving developers time to upgrade to a secure Rails version.

Security News
/Threat Research
A malicious Ruby gem runs a credential-stealing worm during installation, poisons AI coding tools, and can wipe files when a stolen GitHub token is revoked.

Security News
GitHub is tightening GitHub Actions security with new restrictions on privileged pull request workflows. Here's what changes and how maintainers are affected.