Security News
RubyGems.org Adds New Maintainer Role
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
@solana/keys
Advanced tools
This package contains utilities for validating, generating, and manipulating addresses and key material. It can be used standalone, but it is also exported as part of the Solana JavaScript SDK @solana/web3.js@experimental
.
Ed25519Signature
This type represents a 64-byte Ed25519 signature of some data with a private key.
Whenever you need to verify that a particular signature is, in fact, the one that would have been produced by signing some known bytes using the private key associated with some known public key, use the verifySignature()
function in this package.
generateKeyPair()
Generates an Ed25519 public/private key pair for use with other methods in this package that accept CryptoKey
objects.
import { generateKeyPair } from '@solana/keys';
const { privateKey, publicKey } = await generateKeyPair();
signBytes()
Given a private CryptoKey
and a Uint8Array
of bytes, this method will return the 64-byte Ed25519 signature of that data as a Uint8Array
.
import { signBytes } from '@solana/keys';
const data = new Uint8Array([1, 2, 3]);
const signature = await signBytes(privateKey, data);
verifySignature()
Given a public CryptoKey
, an Ed25519Signature
, and a Uint8Array
of bytes, this method will return true
if the signature was produced by signing the bytes using the private key associated with the public key, and false
otherwise.
import { verifySignature } from '@solana/keys';
const data = new Uint8Array([1, 2, 3]);
if (!(await verifySignature(publicKey, signature, data))) {
throw new Error('The data were *not* signed by the private key associated with `publicKey`');
}
FAQs
Helpers for generating and transforming key material
The npm package @solana/keys receives a total of 2,521 weekly downloads. As such, @solana/keys popularity was classified as popular.
We found that @solana/keys demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 13 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
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.
Security News
Research
Socket's threat research team has detected five malicious npm packages targeting Roblox developers, deploying malware to steal credentials and personal data.