tweetnacl-js | Port of TweetNaCl cryptographic library to JavaScript | Cryptography library

 by   dchest JavaScript Version: 1.0.3 License: Unlicense

kandi X-RAY | tweetnacl-js Summary

kandi X-RAY | tweetnacl-js Summary

tweetnacl-js is a JavaScript library typically used in Security, Cryptography applications. tweetnacl-js has no bugs, it has no vulnerabilities, it has a Permissive License and it has medium support. You can install using 'npm i tweetnacljs' or download it from GitHub, npm.

The primary goal of this project is to produce a translation of TweetNaCl to JavaScript which is as close as possible to the original C implementation, plus a thin layer of idiomatic high-level API on top of it.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              tweetnacl-js has a medium active ecosystem.
              It has 1630 star(s) with 309 fork(s). There are 46 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 4 open issues and 147 have been closed. On average issues are closed in 167 days. There are 3 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of tweetnacl-js is 1.0.3

            kandi-Quality Quality

              tweetnacl-js has 0 bugs and 0 code smells.

            kandi-Security Security

              tweetnacl-js has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              tweetnacl-js code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              tweetnacl-js is licensed under the Unlicense License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              tweetnacl-js releases are available to install and integrate.
              Deployable package is available in npm.
              Installation instructions, examples and code snippets are available.
              It has 287 lines of code, 6 functions and 43 files.
              It has low code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed tweetnacl-js and discovered the below as its top functions. This is intended to give you an instant insight into tweetnacl-js implemented functionality, and help decide if they suit your requirements.
            • Loops over a hash .
            • This function is called from KDF2
            • The HAB - specific function for the given key .
            • Calculate NaN
            • Core core implementation
            • Cryptographically hash .
            • unpack negation .
            • Generates a sign signature
            • Cryptographically hash blocks .
            • Open sign and sign a signature .
            Get all kandi verified functions for this library.

            tweetnacl-js Key Features

            No Key Features are available at this moment for tweetnacl-js.

            tweetnacl-js Examples and Code Snippets

            No Code Snippets are available at this moment for tweetnacl-js.

            Community Discussions

            QUESTION

            How do I convert a 44 bytes long base64 string (public key) to a 32 bytes long UInt8 array?
            Asked 2022-Feb-09 at 11:02

            I'm using the swift-sodium library and need a 32 bytes long UInt8 array (public key) to seal a message. However, the public key which is generated by the tweetnacl-js library that I got from an api is a 44 bytes long base64 string. How do I convert the 44 bytes long base64 public key to a 32 bytes long UInt8 array so I can pass it to the seal function?

            ...

            ANSWER

            Answered 2022-Feb-09 at 11:02

            You can convert your Base64-String using the following example:

            Source https://stackoverflow.com/questions/71035178

            QUESTION

            TweetNaCl.js minimal Public-key signatures example
            Asked 2020-Nov-11 at 09:16

            I am trying to understand how to implement a minimal basic Public-key signature example based on the demo located here, using pure javascript.

            My research has not yielded a simple javascript example that I can use to understand its inner workings, and the documentation is over my head at the moment.

            I tried looking at the source code of the demo, but it is not revealing its secrets.

            The library's examples does not have an example for this either.

            Cryptography is something very new to me, so any baseline example of how to create their Public-key example with pure javascript in node.js would be greatly appreciated!

            Pseudocode-ish:

            ...

            ANSWER

            Answered 2020-Nov-11 at 09:16

            TweetNaCl.js is a port to JavaScript of TweetNaCl. TweetNacl in turn is a compact implementation of NaCl, which provides various encryption and signature algorithms essentially based on Curve25519. There are NaCl-compatible implementations or wrappers for many platforms, so that any of these documentations can be used for an introduction, e.g. the clear documentation of the Libsodium fork.

            The documentation of TweetNaCl.js also gives a short overview of the functionality: nacl.sign(message, secretKey) creates a signed message consisting of the 64 bytes signature with attached message. nacl.sign.open(signedMessage, publicKey) verifies the message using the signature and returns the message if verification is successful. The algorithm used for signing is Ed25519.

            As already noted in the comments, you do not distinguish clearly between encryption (purpose: secrecy) and signing (purpose: authentication / integrity). In particular, secrecy of the message is not the purpose of signing. This becomes apparent e.g. when the return of nacl.sign() contains the unencrypted message (see code snippet below). However, it is true that encryption with the private key is performed during signing (but not for the purpose of keeping it secret).

            The following implementation is a pure JavaScript implementation:

            Source https://stackoverflow.com/questions/64761119

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install tweetnacl-js

            You can install TweetNaCl.js via a package manager:. or [download source code](https://github.com/dchest/tweetnacl-js/releases).

            Support

            [Public-key authenticated encryption (box)](#public-key-authenticated-encryption-box). [Secret-key authenticated encryption (secretbox)](#secret-key-authenticated-encryption-secretbox).
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries

            Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular Cryptography Libraries

            dogecoin

            by dogecoin

            tink

            by google

            crypto-js

            by brix

            Ciphey

            by Ciphey

            libsodium

            by jedisct1

            Try Top Libraries by dchest

            captcha

            by dchestGo

            uniuri

            by dchestGo

            webp-quicklook

            by dchestC

            siphash

            by dchestGo

            semicolon-js

            by dchestShell