npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jscrypto/speck

v0.4.2

Published

SPECK block cipher components for @jscrypto.

Downloads

932

Readme

@jscrypto/speck

CI Coverage Status NPM CDNJS

Migration Notice

@jscrypto/speck is a legacy standalone package. It remains installable with @jscrypto/core up to 0.9.1, but new integrations should use the component package listed below.

Starting with @jscrypto 0.9.0, SPECK components moved into the new component architecture:

  • Node / bundlers: use @jscrypto/ciphers
  • Browser bundle: use @jscrypto/ciphers/speck/browser
  • Registry preset: use speckPreset from @jscrypto/ciphers/speck

This package now declares @jscrypto/core as >=0.8.0 <=0.9.1 for compatibility with transition releases. Prefer the new @jscrypto/ciphers component layout for 0.9.x projects.

SPECK block cipher components for @jscrypto/core.

This package is an adapter. It depends on js-speck for the SPECK algorithm and registers each SPECK variant as a fixed-size @jscrypto block cipher component.

SPECK is a niche/legacy/lightweight block cipher family. Do not treat it as a default recommendation for new encryption designs.

The raw SPECK component has no mode, padding, IV, KDF, salt, or authentication by itself. If a protocol specifically requires modes or paddings, compose them from @jscrypto/classic. Modes can be composed only when their structural requirements are met; for example, GCM requires a 128-bit block cipher, so only SPECK128 variants are structurally compatible.

Demo

Speck Encrypt Online
Speck Decrypt Online

Install

npm install @jscrypto/speck

Optional modes and paddings:

npm install @jscrypto/classic

Quick Start

import { registry } from '@jscrypto/classic';
import { speckPreset } from '@jscrypto/speck';

registry.use(speckPreset);

const cipher = registry.createCipher({
  cipher: 'SPECK64/128',
  mode: 'CBC',
  padding: 'Pkcs7',
  key,
  iv,
});

Direct Helper

import { createSpeckCipher } from '@jscrypto/speck';

const cipher = createSpeckCipher('64-128', key);
const output = new Uint8Array(plaintextBlock.length);
cipher.encrypt(plaintextBlock, output);

There is no default variant. Always pass an explicit helper name such as 64-128.

Requires @jscrypto/core v0.8.0 or later.

Variants

| Helper | Registry name | Block | Key | |----------|-----------------|-------|------| | 32-64 | SPECK32/64 | 4 | 8 | | 48-72 | SPECK48/72 | 6 | 9 | | 48-96 | SPECK48/96 | 6 | 12 | | 64-96 | SPECK64/96 | 8 | 12 | | 64-128 | SPECK64/128 | 8 | 16 | | 96-96 | SPECK96/96 | 12 | 12 | | 96-144 | SPECK96/144 | 12 | 18 | | 128-128| SPECK128/128 | 16 | 16 | | 128-192| SPECK128/192 | 16 | 24 | | 128-256| SPECK128/256 | 16 | 32 |

Key length alone is not enough to choose a variant. For example, 12-byte keys are shared by Speck48/96, Speck64/96, and Speck96/96.

Browser

Browser builds are split by package. Load @jscrypto/core and @jscrypto/classic when you need a registry with modes or paddings, then register the SPECK preset from @jscrypto/speck.

<script src="jscrypto-core.iife.min.js"></script>
<script src="jscrypto-classic.iife.min.js"></script>
<script src="jscrypto-speck.iife.min.js"></script>
<script>
  jscryptoClassic.registry.use(jscryptoSpeck.speckPreset);
</script>

Package export paths:

  • @jscrypto/speck/browser
  • @jscrypto/speck/umd

UMD/AMD builds expose SPECK components and do not re-export @jscrypto/core. Load @jscrypto/core or @jscrypto/classic separately when you need a registry.

CommonJS users can require the regular UMD .js builds because this package uses explicit .mjs and .cjs entry files instead of package-level "type": "module".

License

MIT