Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
@functionland/fula-sec
Advanced tools
<!-- *** Thanks for checking out the Best-README-Template. If you have a suggestion *** that would make this better, please fork the repo and create a pull request *** or simply open an issue with the tag "enhancement". *** Don't forg
Fula Security Layer Includes Data Authentication, Decentralized Identity and Encryption.
Fula-sec providing two different way encryption methods.
Install NPM package
npm install @functionland/fula-sec --save
import {FullaDID} from '@functionland/fula-sec'
// Fulla DID
const fullaDID = new FullaDID();
// ...
// Create DID identity () => return {did|authDID, mnemonic, privateKey}
await fullaDID.create();
// You can also call backup option by using getter -> fullaDID.backup () => return {did|authDID, mnemonic, privateKey}
// Import Options:
// 1. Import with mnemonic
// 2. Import with privateKey
// Import existing mnemonic phrase () => return {did|authDID, privateKey}
// mnemonic example: 'mercy drip similar hole oil lock blast absent medal slam world sweet',
await fullaDID.importMnemonic(result.mnemonic);
// Import existing privateKey () => return {did|authDID, privateKey}
// privateKey example: ff396d82b24b3f8f200cc240bb6d0770911c82e1d8c0199638373221efedabd5
await fullaDID.importPrivateKey(result.privateKey);
import {FullaDID, TaggedEncryption} from '@functionland/fula-sec'
// Alice creates own DID
const AliceDID = new FullaDID();
await AliceDID.create();
const taggedA = new TaggedEncryption(AliceDID.did);
// Bob creates own DID
const BobDID = new FullaDID();
await BobDID.create();
const taggedB = new TaggedEncryption(BobDID.did);
// 1. Handshake |Alice DID| <--- |Bob DID|
// 2. Share Content |Encrypt | jwe-> |Decrypt|
// Alice is issuer and she want to share content with Bob (Audience)
let plaintext = {
symetricKey: 'content-privateKey',
CID: 'Content ID'
}
// Alice encrypts the content by adding Bob's DID id () => return jwe {}
let jwe = await taggedA.encrypt(plaintext.symetricKey, plaintext.CID, [BobDID.did.id])
// Bob decrypts to get the content allowed by Alice.
let dec = await taggedB.decrypt(jwe)
import {FullaDID, AsymEncryption} from '@functionland/fula-sec'
// Alice creates own DID (Issuer)
const AliceDID = new FullaDID();
await AliceDID.create();
// Set privateKey
const asymEncA = new AsymEncryption(AliceDID.privateKey);
// Bob creates own DID (Audience)
const BliceDID = new FullaDID();
await BliceDID.create();
// Set privateKey
const asymEncB = new AsymEncryption(BliceDID.privateKey);
/*
1. Bob shares PublicKey with Alice
2. Encrypt content with Bob`s PubKey and Decrypt JWE with Bob`s
| Alice | | Bob |
|publicKey=(DID^pk) | <--- |publicKey=(DID^pk)|
|jwe=Enc(m, Bob^PubKey) | jwe-> |Dec(cip, Bob^pk) |
*/
// Alice is issuer and she want to share content with Bob (Audience)
let plaintext = {
symetricKey: 'content-privateKey',
CID: 'Content ID'
}
// Issuer (Alice) encrypts plaintext with Audience (Bob) PublicKey
let jweCipher = await asymEncA.encrypt(plaintext.symetricKey, plaintext.CID, [asymEncB.publicKey]);
// Audience (Bob) decrypts with own private Key
let decrypted = await asymEncB.decrypt(jweCipher);
Run doc cmd
npx typedoc --out docs
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
git checkout -b feature/AmazingFeature
)git commit -m 'Add some AmazingFeature'
)git push origin feature/AmazingFeature
)See LICENSE
for more information.
FAQs
This library provides security features of Fula Protocol
The npm package @functionland/fula-sec receives a total of 2 weekly downloads. As such, @functionland/fula-sec popularity was classified as not popular.
We found that @functionland/fula-sec demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.