All Projects → jedisct1 → Siphash Js

jedisct1 / Siphash Js

Licence: bsd-2-clause
A Javascript implementation of SipHash-2-4

Programming Languages

javascript
184084 projects - #8 most used programming language
typescript
32286 projects

Projects that are alternatives of or similar to Siphash Js

Securitydriven.inferno
✅ .NET crypto done right. Professionally audited.
Stars: ✭ 501 (+456.67%)
Mutual labels:  hash, cryptography, crypto
Nsec
A modern and easy-to-use cryptographic library for .NET Core based on libsodium
Stars: ✭ 217 (+141.11%)
Mutual labels:  hash, cryptography, crypto
Jmacaroons
Pure Java implementation of Macaroons: Cookies with Contextual Caveats for Decentralized Authorization in the Cloud. Android ready. Online playground available.
Stars: ✭ 100 (+11.11%)
Mutual labels:  authentication, cryptography, crypto
Securefs
Filesystem in userspace (FUSE) with transparent authenticated encryption
Stars: ✭ 518 (+475.56%)
Mutual labels:  authentication, cryptography, crypto
Featherduster
An automated, modular cryptanalysis tool; i.e., a Weapon of Math Destruction
Stars: ✭ 876 (+873.33%)
Mutual labels:  cryptography, crypto
Simon Speck C
example C language implementation of SIMON and SPECK lightweight block ciphers.
Stars: ✭ 9 (-90%)
Mutual labels:  cryptography, crypto
Supergirloncrypt
CryptoTrojan in Python (For educational purpose ONLY)
Stars: ✭ 28 (-68.89%)
Mutual labels:  cryptography, crypto
Cryptojs.swift
Cross-platform cryptographic functions in swift
Stars: ✭ 42 (-53.33%)
Mutual labels:  cryptography, crypto
Virgil Crypto Php
Virgil PHP Crypto Library is a high-level cryptographic library that allows you to perform all necessary operations for secure storing and transferring data and everything required to become HIPAA and GDPR compliant.
Stars: ✭ 22 (-75.56%)
Mutual labels:  cryptography, crypto
Crypton
Library consisting of explanation and implementation of all the existing attacks on various Encryption Systems, Digital Signatures, Key Exchange, Authentication methods along with example challenges from CTFs
Stars: ✭ 995 (+1005.56%)
Mutual labels:  cryptography, crypto
Write Ups
📚 VoidHack CTF write-ups
Stars: ✭ 45 (-50%)
Mutual labels:  cryptography, crypto
Halite
High-level cryptography interface powered by libsodium
Stars: ✭ 933 (+936.67%)
Mutual labels:  authentication, cryptography
Fernet Java8
Java 8 implementation of the Fernet Specification
Stars: ✭ 24 (-73.33%)
Mutual labels:  authentication, cryptography
Java Crypto Utils
Java Cryptographic, Encoding and Hash Utilities
Stars: ✭ 15 (-83.33%)
Mutual labels:  hash, cryptography
Aeternity
æternity: solving scalability problems by making sense of state-channels
Stars: ✭ 923 (+925.56%)
Mutual labels:  cryptography, crypto
Simple Cryptography
Scripts that illustrate basic cryptography concepts based on Coursera Standford Cryptography I course and more.
Stars: ✭ 40 (-55.56%)
Mutual labels:  cryptography, crypto
Fhe Toolkit Linux
IBM Fully Homomorphic Encryption Toolkit For Linux. This toolkit is a Linux based Docker container that demonstrates computing on encrypted data without decrypting it! The toolkit ships with two demos including a fully encrypted Machine Learning inference with a Neural Network and a Privacy-Preserving key-value search.
Stars: ✭ 1,123 (+1147.78%)
Mutual labels:  cryptography, crypto
Minisign
A dead simple tool to sign files and verify digital signatures.
Stars: ✭ 1,105 (+1127.78%)
Mutual labels:  cryptography, crypto
Crypto Bench
Benchmarks for crypto libraries (in Rust, or with Rust bindings)
Stars: ✭ 67 (-25.56%)
Mutual labels:  cryptography, crypto
Themis
Easy to use cryptographic framework for data protection: secure messaging with forward secrecy and secure data storage. Has unified APIs across 14 platforms.
Stars: ✭ 1,232 (+1268.89%)
Mutual labels:  authentication, cryptography

siphash.js

A pure Javascript implementation of SipHash-2-4

SipHash is a family of pseudorandom functions optimized for short inputs. Target applications include network traffic authentication and hash-table lookups protected against hash-flooding denial-of-service attacks. SipHash has well-defined security goals and competitive performance.

This package also includes implementations of SipHash-1-3, SipHash128, and SipHash128-1-3.

Installation

Server-side installation (io.js/nodejs):

$ npm install siphash

Browser-side/single-line minified version: use lib/siphash.js.min. or use Bower:

$ bower install siphash

Usage

var siphash = require("siphash"),
    key = siphash.string16_to_key("This is the key!"),
    message = "Short test message",
    hash_hex = siphash.hash_hex(key, message);

A key is an array of 4 integers, and each of them will be clamped to 32 bits in order to build a 128-bit key. For a random key, just generate 4 random integers instead of calling string16_to_key().

var siphash = require("siphash"),
    key = [ 0xdeadbeef, 0xcafebabe, 0x8badf00d, 0x1badb002 ],
    message = "Short test message",
    hash_hex = siphash.hash_hex(key, message);

The 64-bit hash can also be obtained as two 32-bit values with hash(key, message):

var siphash = require("siphash"),
    key = [ 0xdeadbeef, 0xcafebabe, 0x8badf00d, 0x1badb002 ],
    message = "Short test message",
    hash = siphash.hash(key, message),
    hash_msb = hash.h,
    hash_lsb = hash.l;

A 53-bit unsigned integer can be obtained with hash_uint(key, message):

var siphash = require("siphash"),
    key = siphash.string16_to_key("0123456789ABCDEF"),
    message = "Short test message",
    index = siphash.hash_uint(key, message);

SipHash-1-3

SipHash-1-3 is a faster variant of SipHash-2-4 with fewer rounds, which is still believed to be secure enough for typical uses. This variant is available here: siphash13.js

SipHash-double

Although not part of the module, an implementation of SipHash with 128-bit output is also available: siphash-double.js

SipHash-1-3 with a 128-bit output is also part of the package: siphash13-double.js

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].