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-pcrypto is a module python cryptography
From pip:
pip install ntc-pcrypto
From Source:
git clone https://github.com/congnghia0609/ntc-pcrypto.git
cd ntc-pcrypto
python3 setup.py install
pip show ntc-pcrypto
Use encode/decode Base64URL
from sss.sss import *
s = "nghiatcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
print("secret:", s)
print("secret.length:", len(s))
# creates a set of shares
arr = create(3, 6, s, True)
# combines shares into secret
s1 = combine(arr[:3], True)
print("combines shares 1 length =", len(arr[:3]))
print("secret:", s1)
print("secret.length:", len(s1))
s2 = combine(arr[3:], True)
print("combines shares 2 length =", len(arr[3:]))
print("secret:", s2)
print("secret.length:", len(s2))
s3 = combine(arr[1:5], True)
print("combines shares 3 length =", len(arr[1:5]))
print("secret:", s3)
print("secret.length:", len(s3))
Use encode/decode Hex
from sss.sss import *
s = "nghiatcxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
print("secret:", s)
print("secret.length:", len(s))
# creates a set of shares
arr = create(3, 6, s, False)
# combines shares into secret
s1 = combine(arr[:3], False)
print("combines shares 1 length =", len(arr[:3]))
print("secret:", s1)
print("secret.length:", len(s1))
s2 = combine(arr[3:], False)
print("combines shares 2 length =", len(arr[3:]))
print("secret:", s2)
print("secret.length:", len(s2))
s3 = combine(arr[1:5], False)
print("combines shares 3 length =", len(arr[1:5]))
print("secret:", s3)
print("secret.length:", len(s3))
This code is under the Apache License v2.
FAQs
ntc-pcrypto is a module python cryptography
We found that ntc-pcrypto 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.