Code Monkey home page Code Monkey logo

enigma's People

Contributors

alessandro-p avatar alessiopcc avatar carlo-aromando avatar danieleveri avatar dependabot[bot] avatar lurenzsgp avatar madcat78 avatar marmos91 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

enigma's Issues

How to use it in angular?

I installed it with NPM

after in my component:
import Enigma from '@cubbit/enigma';

but what is next?

Alternative export API for optimized delivery

Just found this library, and I think you guys have nailed the problem that is isomorphic crypto, and the approach appears really well researched and developed. In the interest of optimising real-world application use and making it a bit more user-friendly, I've got some suggestions:

For most projects I've worked on, only one, possibly two crypto methods are required. For these projects, modern tree-shaking build systems can optimise application code by removing unused code paths.

Unfortunately, right now Enigma's module pattern appears to prevent that, as destructured imports (import {AES} from '@cubbit/enigma) aren't valid, and import Enigma means bundling the entire library, even though the vast majority of that code will never be used.

On a related note, the new Enigma.AES().init({key}).then(aes => aes.encrypt(message)) API seems unnecessarily unwieldy. Surely static async methods such as AES.encrypt(message, key) should be possible?

Otherwise I'd hazard that most people, like me, will have to write our own convenience wrappers around that API.

But the tree-shaking thing is more important, as it's not possible to address in userland, and some applications (like ours!) are very sensitive to the size of our script payloads.

ED25519 exported format

In the documentation we do not know the format on witch the public and private key is formatted.
Like pem, PKIX or something else.
Could really be helpful for compatibility resons include it in the doc.

Unsupported arch: ia32 - linux?

Hi! Looks promising. I tried it out as :

git clone https://github.com/cubbit/enigma.git 
cd enigma 
npm install

everything seem to go alright until the install runs node-gyp rebuild :

make: Entering directory `/var/www/html/valg/lib/enigma/build'
  ACTION Prepare dependencies /var/www/html/valg/lib/enigma/dependencies
Error: Unsupported arch: ia32 - linux
    at dependencies (/var/www/html/valg/lib/enigma/scripts/node/dependencies.js:70:27)
    at Object.<anonymous> (/var/www/html/valg/lib/enigma/scripts/node/dependencies.js:106:3)
    at Module._compile (module.js:653:30)
    at Object.Module._extensions..js (module.js:664:10)
    at Module.load (module.js:566:32)
    at tryModuleLoad (module.js:506:12)
    at Function.Module._load (module.js:498:3)
    at Function.Module.runMain (module.js:694:10)
    at startup (bootstrap_node.js:204:16)
    at bootstrap_node.js:625:3

Not sure what it is, and how to solve it. Just runnng on a laptup with ubuntu 14.04.

Context undefined

Hi,
I am trying to implement the Enigma module in a simple React project, but I keep getting TypeError: context is undefined thrown by the em_array_malloc function.

I followed the guide in the readme but can't figure out why context is undefined.

AES encryption does not work on Microsoft Edge

Hello, I've tried to test the AES encryption in GCM mode on Microsoft Edge 44.18362.449.0 (CRT is not supported on Edge) but does not work.

This is the example I've tried:

new Enigma.AES().init({algorithm: Enigma.AES.Algorithm.GCM}).then(async (aes: Enigma.AES) =>
{
    const my_secret = 'My secret';

    try
    {
        const cipher = await aes.encrypt(my_secret);
        console.log(cipher);
    }
    catch(error)
    {
        console.error(error.message);
    }
});

And this is the error logged:
Could not complete the operation due to error 8070000b.

After a quick search on the error, it is perhaps related to an incompatibility of the WebCrypto API implemented on Edge.
Here is another issue encountered for the WebCrypto API on Edge:
https://stackoverflow.com/questions/33043091/public-key-encryption-in-microsoft-edge

Add support for HMAC

Such as crypto does with createHmac function, we should implement our own implementation in Enigma.

We could implement this into Hash module. It could take as arguments an algorithm (e.g. SHA256), a key and the information to hash.

WASM in Enigma

Where exactly is WASM used in this library? The description says "In a web environment, Enigma leverages on a WebAssembly-compiled version of OpenSSL to boost performances." but it seems to me it is just using Web Crypto?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.