Security News
Supply Chain Attack Detected in Solana's web3.js Library
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
github.com/KevinJoiner/mnemonic
The Mnemonic package provides a flexible and customizable way to encode data into a mnemonic word list. It implements the BIP-0039 specification using big.Int
, allowing for the use of arbitrary entropy sizes.
BIP-0039 Specification: The implementation adheres to the BIP-0039 specification, providing compatibility with various cryptographic systems.
Arbitrary Entropy Sizes: This package allows users to work with arbitrary entropy sizes, providing flexibility in encoding different types of data.
Number Obfuscation: For enhanced usability with IDs, the package offers optional number obfuscation. This feature uses Modular Multiplicative Inverse to convert the provided number into a seemingly random number before generating the mnemonic word list using https://github.com/c2h5oh/hide
To use this package in your Go project, run the following command:
go get github.com/DIMO-Network/mnemonic
All Examples can be found in the go docs or examples_test.go
package main
import (
"fmt"
"github.com/DIMO-Network/mnemonic"
)
func main() {
// Example usage with a number
id := int32(1)
words := mnemonic.FromInt(id)
obfuscatedWords := mnemonic.FromInt32WithObfuscation(id)
fmt.Println(words)
fmt.Println(obfuscatedWords)
// Output: [abandon abandon about]
// [learn island zoo]
// Example usage with a word list
obfuscatedWords := []string{"learn", "island", "zoo"}
deobfuscatedUint, err := mnemonic.ToUint32WithDeobfuscation(obfuscatedWords)
if err != nil {
panic(err)
}
fmt.Println(deobfuscatedUint)
// Output: 1
}
FAQs
Unknown package
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
A supply chain attack has been detected in versions 1.95.6 and 1.95.7 of the popular @solana/web3.js library.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.