p-hatan/ mirror

pub repository

mirror.p-hatan.ir

cipher

0.7.0

A Dart library implementing cryptographic algorithms.

Download archive

Readme

cipher

A Dart library for encryption and decryption. As of today, most of the classes are ports of Bouncy Castle from Java to Dart. The porting is almost always direct except for some classes that had been added to ease the use of low level data.

To make sure nothing fails, tests and benchmarks for every algorithm are provided. The expected results are taken from the Bouncy Castle Java version and also from standards, and matched against the results got from cipher.

As of the last release, the following algorithms are implemented:

Block ciphers:

  • AES

Asymmetric block ciphers:

  • RSA

Stream ciphers:

  • Salsa20

Block cipher modes of operation:

  • CBC (Cipher Block Chaining mode)
  • CFB (Cipher Feedback mode)
  • ECB (Electronic Code Book mode)
  • GCTR (GOST 28147 OFB counter mode)
  • OFB (Output FeedBack mode)
  • CTR (Counter mode)

Paddings:

  • PKCS7

Digests:

  • MD2
  • MD4
  • MD5
  • RIPEMD-128
  • RIPEMD-160
  • RIPEMD-256
  • RIPEMD-320
  • SHA-1
  • SHA-224
  • SHA-256
  • SHA-3
  • SHA-384
  • SHA-512
  • SHA-512/t
  • Tiger
  • Whirlpool

MACs:

  • HMAC

Signatures:

  • ECDSA
  • RSA

Password based key derivators:

  • PBKDF2
  • scrypt

Asymmetric key generators:

  • ECDSA
  • RSA

Entropy sources (true RNGs):

  • URL based (can be used, for example, with random.org)
  • File based (can be used, for example, with /dev/random)

Secure PRNGs:

  • Based on block cipher in CTR mode
  • Based on block cipher in CTR mode with auto reseed (for forward security)
Changelog

Version 0.7.0 (2014-03-??) (Dart SDK version 1.3.0-dev.5.2)

  • [enh 15] Implement stream cipher benchmarks.

  • [enh 64] Benchmark and optimize digests.

  • [enh 74] Make SHA-3 usable in terms of speed.

  • [bug 67] Removed some unused code.

  • [bug 68] Fix process() method of PaddedBlockCipher.

  • [bug 75] Remove a registry dependency in the Scrypt algorithm.

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add cipher
pubspec.yaml
name: cipher
version: 0.7.0
author: Iván Zaera Avellón <izaera@gmail.com>
description: A Dart library implementing cryptographic algorithms.
homepage: http://izaera.github.io/cipher/
environment:
  sdk: '>=0.8.10+6 <2.0.0'
documentation: http://izaera.github.io/cipher/api/
dependencies:
  bignum: '>=0.0.5 <0.1.0'
  fixnum: '>=0.9.0 <0.10.0'
dev_dependencies:
  benchmark_harness: '>=1.0.4 <2.0.0'
  browser: '>=0.9.0 <0.10.0'
  unittest: '>=0.9.0 <0.10.0'

Version history

VersionPublishedArchiveSHA-256
0.0.02013-10-10T20:29:20.274380ZDownloadf6af25b92473affd2738b9a839bac51c25af8e58aba3272606e59acc8b1c08fa
0.0.12013-10-10T20:30:02.259650ZDownloadf881377258b63164f933b49063c0ef6f9a36df39c022a66dc33c5c8c342bfaae
0.0.22013-10-11T20:21:29.455960ZDownload128f01bbf02571b6e98e1b882a7c0cf4219313b341922f7063b4820cc0334cb3
0.1.02013-10-12T20:31:03.414160ZDownload482d96de1e4b5c39f7920a778bd05e4e86be06b10efc96bb62cd5de8ce11d6b0
0.2.02013-10-13T17:43:03.442680ZDownload4e0d607087e7b01141624e3d5b5d8f8a2fa9b826f25d2bd7d72819acc17f0d8e
0.3.02013-11-01T18:10:29.850690ZDownload43e12a855e0aa841d95066d2b3a50da73d1f9a196ff32507241e895b5261e354
0.3.12013-11-11T20:57:32.833720ZDownloadb282572534a195529cb98011818acaf64a2d3434e9e6130fc6f75ede9ba9c033
0.4.02013-11-18T21:20:54.924380ZDownloadb2ff9d2f8834bcad577595ce92a7c09788cc14950045865e6c772da87eedbdb1
0.5.02014-01-15T15:59:52.081150ZDownloadb96e73fcd607853d539af04b3e6a94ab086f1d076af205b622052c0203868bed
0.5.12014-01-20T07:58:41.859370ZDownload1ba9f432cd2869d434af8be590bba36305e991e5c789199ccfddb45e95595077
0.6.02014-02-24T20:58:02.563890ZDownload5f3977621bc6264f8ec8e5ff6bce5d7a046fbf5fedd90f5d63f5bbd0e1bea308
0.7.02014-03-22T18:00:24.822430ZDownload1cbd576ab91fafb4fbddbf67acdd10fa609d9536a47f5a01b5c2ecda8c058826
0.7.12014-05-11T18:49:34.808020ZDownloadfb9271f1e22c6e3191edfecf23a15c0317a110223899d8f07e76da77ca5a718f

Dependencies

bignum "\u003e=0.0.5 \u003c0.1.0"

fixnum "\u003e=0.9.0 \u003c0.10.0"