Research
Security News
Threat Actor Exposes Playbook for Exploiting npm to Build Blockchain-Powered Botnets
A threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
react-native-recovery-kit
Advanced tools
Use this library to securely spilt the private key in 3 different parts. Can upload one shard to users google drive using google drive access token. Second key can be uploaded to Enterprise AWS S3 bucket. The third key is returned back.
Create a .npmrc file in the root directory or where the package.json stays and paste the following code and use the auth_token given by silence laboratories.
//registry.npmjs.org/:_authToken=<auth_token>
Then, run the following command in terminal
yarn add @silencelaboratories/react-native-recovery-kit react-native-randombytes
This is using react-native-randombytes as a peer-dependencies, yarn will link dependencies better then npm
During integration of the Silent Shard Recovery SDK, you are requested to setup cloud accesses and permissions for storage management. The following two steps are mandatory before usage of the recovery Kit.
Before using the functions directly, we have to configure. This is not compulsory but a recommended way to use the library. You can use the configure by passing the following parameters:
RecoveryKit.configure({
drive: {
googleAccessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
driveFileName: 'FILE NAME FOR DRIVE',
driveFolderName: 'FOLDER NAME FOR DRIVE',
},
AWS: {
accessKeyId: 'xxxxxxxxxxxxxxxxx',
secretAccesskey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
signatureVersion: 'v4',
bucket: 'xxxxxxxxxxx',
fileName: 'FILE NAME FOR AWS'
},
numberOfShares: n,
threshold: k,
})
drive parameters (line 2) : This will take 3 values.
AWS parameters (line 7): This will take 5 values. This parameter is optional and only needed when AWS S3 bucket is setup. To setup the AWS S3 bucked follow this guide.
numberOfShares (line 14): number of shares you want to create include one uploaded to drive and AWS, (default value is 3)
threshold (line 15): number of shards needed for recovery. (default value is 2)
Pass the private key (hex string) and the library will use the configured data. Function will split the private key in to n shards (numberOfShares). One will be uploaded to Google Drive using google access token, one will be uploaded to AWS which is configured. On success the function will return and array of remaining shards.
await RecoveryKit.upload({
privateKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', //hex string
});
Call the recovery function to recover the private key. For recovery at least threshold number of shards (k shards) are needed. If AWS is setup then this will use drive shard and AWS shard and need k-2 recovery shards. Function will return the original private key.
await RecoveryKit.recovery({
recoveryShards: [
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
...,
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
] // at least threshold number of shards including drive and AWS shard
});
If not using configured then also go through the configuration once as we will pass the same parameters in functions.
Pass the configuration parameters with the private key (hex string). Function will split the private key in to n shards (numberOfShares). One will be uploaded to Google Drive using google access token, one will be uploaded to AWS which is configured. On success the function will return and array of remaining shards.
await RecoveryKit.upload({
drive: {
googleAccessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
driveFileName: 'FILE NAME FOR DRIVE',
driveFolderName: 'FOLDER NAME FOR DRIVE',
},
AWS: {
accessKeyId: 'xxxxxxxxxx',
secretAccesskey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
signatureVersion: 'v4',
bucket: 'xxxxxxxxxxx',
fileName: 'FILE NAME FOR AWS'
},
numberOfShares: n,
threshold: k,
privateKey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', //hex string
});
Pass the configuration parameters with the recoveryShard. Call the recovery function to recover the private key. For recovery at least threshold number of shards (k shards) are needed. If AWS is setup then this will use drive shard and AWS shard and need k-2 recovery shards. Function will return the original private key.
await RecoveryKit.recovery({
drive: {
googleAccessToken: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
driveFileName: 'FILE NAME FOR DRIVE',
driveFolderName: 'FOLDER NAME FOR DRIVE',
},
AWS: {
accessKeyId: 'xxxxxxxxxx',
secretAccesskey: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
signatureVersion: 'v4',
bucket: 'xxxxxxxxxxx',
fileName: 'FILE NAME FOR AWS'
},
recoveryShards: [
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
...
'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
], //at least threshold number of shards including drive and AWS shard
});
FAQs
MPC based recovery kit
The npm package react-native-recovery-kit receives a total of 0 weekly downloads. As such, react-native-recovery-kit popularity was classified as not popular.
We found that react-native-recovery-kit demonstrated a not healthy version release cadence and project activity because the last version was released 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 threat actor's playbook for exploiting the npm ecosystem was exposed on the dark web, detailing how to build a blockchain-powered botnet.
Security News
NVD’s backlog surpasses 20,000 CVEs as analysis slows and NIST announces new system updates to address ongoing delays.
Security News
Research
A malicious npm package disguised as a WhatsApp client is exploiting authentication flows with a remote kill switch to exfiltrate data and destroy files.