Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
ntc-rcrypto is a module ruby cryptography.
Add this line to your application's Gemfile:
gem 'ntc-rcrypto'
And then execute:
bundle install
Or install it yourself as:
gem install ntc-rcrypto
Use encode/decode Base64Url
require 'rcrypto'
sss = Rcrypto::SSS.new
s = "nghiatcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
puts s
puts s.length
# creates a set of shares
arr = sss.create(3, 6, s, true)
# puts arr
# combines shares into secret
s1 = sss.combine(arr[0...3], true)
puts s1
puts s1.length
s2 = sss.combine(arr[3...6], true)
puts s2
puts s2.length
s3 = sss.combine(arr[1...5], true)
puts s3
puts s3.length
Use encode/decode Hex
require 'rcrypto'
sss = Rcrypto::SSS.new
s = "nghiatcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
puts s
puts s.length
# creates a set of shares
arr = sss.create(3, 6, s, false)
# puts arr
# combines shares into secret
s1 = sss.combine(arr[0...3], false)
puts s1
puts s1.length
s2 = sss.combine(arr[3...6], false)
puts s2
puts s2.length
s3 = sss.combine(arr[1...5], false)
puts s3
puts s3.length
This code is under the Apache License v2.
FAQs
Unknown package
We found that ntc-rcrypto demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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.
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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.