Skip to content
This repository has been archived by the owner on Dec 23, 2020. It is now read-only.

Commit

Permalink
Renamed cipher to Pointy Castle
Browse files Browse the repository at this point in the history
  • Loading branch information
stevenroose committed Jan 26, 2016
1 parent e747fc4 commit 31ef585
Show file tree
Hide file tree
Showing 223 changed files with 712 additions and 712 deletions.
6 changes: 3 additions & 3 deletions LICENSE
@@ -1,5 +1,5 @@

The cipher library is dually licensed under "GNU LESSER GENERAL PUBLIC LICENSE 3.0" and
The Pointy Castle library is dually licensed under "GNU LESSER GENERAL PUBLIC LICENSE 3.0" and
"Mozilla Public License 2.0".

Initially the project was just released under LGPL 3.0 but due to the way dart2js works, it was
Expand All @@ -9,8 +9,8 @@ implementation which is impossible due to dart2js not supporting dynamic linking

With MPL 2.0 the library can be compiled with dart2js and mixed with closed source without violating
the license. The good thing is that, even with that possibility, modifications to any source file
belonging to cipher library must be made available under MPL 2.0 and contributed to the original
project so they will still remain free.
belonging to the Pointy Castle library must be made available under MPL 2.0 and contributed to the
original project so they will still remain free.

Following are the contents of both licenses.

Expand Down
6 changes: 3 additions & 3 deletions README.md
@@ -1,5 +1,5 @@
cipher
======
Pointy Castle
=============

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
Expand All @@ -8,7 +8,7 @@ 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.
and also from standards, and matched against the results got from Pointy Castle.

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

Expand Down
2 changes: 1 addition & 1 deletion benchmark/all_benchmarks.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.all_benchmarks;
library pointycastle.benchmark.all_benchmarks;

import "./src/ufixnum_benchmark.dart" as ufixnum_benchmark;

Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark/block_cipher_benchmark.dart
Expand Up @@ -5,11 +5,11 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.benchmark.block_cipher_benchmark;
library pointycastle.benchmark.benchmark.block_cipher_benchmark;

import "dart:typed_data";

import "package:cipher/cipher.dart";
import "package:pointycastle/pointycastle.dart";

import "../benchmark/rate_benchmark.dart";

Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark/digest_benchmark.dart
Expand Up @@ -5,11 +5,11 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.benchmark.digest_benchmark;
library pointycastle.benchmark.benchmark.digest_benchmark;

import "dart:typed_data";

import "package:cipher/cipher.dart";
import "package:pointycastle/pointycastle.dart";

import "../benchmark/rate_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark/operation_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.benchmark.rate_benchmark;
library pointycastle.benchmark.benchmark.rate_benchmark;

import 'package:benchmark_harness/benchmark_harness.dart';

Expand Down
2 changes: 1 addition & 1 deletion benchmark/benchmark/rate_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.benchmark.rate_benchmark;
library pointycastle.benchmark.benchmark.rate_benchmark;

import 'package:benchmark_harness/benchmark_harness.dart';

Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark/signer_benchmark.dart
Expand Up @@ -5,11 +5,11 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.benchmark.signer_benchmark;
library pointycastle.benchmark.benchmark.signer_benchmark;

import "dart:typed_data";

import "package:cipher/cipher.dart";
import "package:pointycastle/pointycastle.dart";

import "../benchmark/rate_benchmark.dart";

Expand Down
4 changes: 2 additions & 2 deletions benchmark/benchmark/stream_cipher_benchmark.dart
Expand Up @@ -5,11 +5,11 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.benchmark.stream_cipher_benchmark;
library pointycastle.benchmark.benchmark.stream_cipher_benchmark;

import "dart:typed_data";

import "package:cipher/cipher.dart";
import "package:pointycastle/pointycastle.dart";

import "../benchmark/rate_benchmark.dart";

Expand Down
4 changes: 2 additions & 2 deletions benchmark/block/aes_fast_benchmark.dart
Expand Up @@ -5,11 +5,11 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.block.aes_fast_benchmark;
library pointycastle.benchmark.block.aes_fast_benchmark;

import "dart:typed_data";

import "package:cipher/cipher.dart";
import "package:pointycastle/pointycastle.dart";

import "../benchmark/block_cipher_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/md2_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.md2_benchmark;
library pointycastle.benchmark.digests.md2_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/md4_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.md4_benchmark;
library pointycastle.benchmark.digests.md4_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/md5_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.md5_benchmark;
library pointycastle.benchmark.digests.md5_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/ripemd128_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.ripemd128_benchmark;
library pointycastle.benchmark.digests.ripemd128_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/ripemd160_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.ripemd160_benchmark;
library pointycastle.benchmark.digests.ripemd160_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/ripemd256_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.ripemd256_benchmark;
library pointycastle.benchmark.digests.ripemd256_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/ripemd320_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.ripemd320_benchmark;
library pointycastle.benchmark.digests.ripemd320_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/sha1_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.sha1_benchmark;
library pointycastle.benchmark.digests.sha1_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/sha224_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.sha224_benchmark;
library pointycastle.benchmark.digests.sha224_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/sha256_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.sha256_benchmark;
library pointycastle.benchmark.digests.sha256_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/sha384_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.sha384_benchmark;
library pointycastle.benchmark.digests.sha384_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/sha3_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.sha3_benchmark;
library pointycastle.benchmark.digests.sha3_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/sha512_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.sha512_benchmark;
library pointycastle.benchmark.digests.sha512_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/sha512t_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.sha512t_benchmark;
library pointycastle.benchmark.digests.sha512t_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/tiger_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.tiger_benchmark;
library pointycastle.benchmark.digests.tiger_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
2 changes: 1 addition & 1 deletion benchmark/digests/whirlpool_benchmark.dart
Expand Up @@ -5,7 +5,7 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.digests.whirlpool_benchmark;
library pointycastle.benchmark.digests.whirlpool_benchmark;

import "../benchmark/digest_benchmark.dart";

Expand Down
6 changes: 3 additions & 3 deletions benchmark/signers/rsa_signer_benchmark.dart
Expand Up @@ -5,11 +5,11 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.signers.rsa_signer_benchmark;
library pointycastle.benchmark.signers.rsa_signer_benchmark;

import 'package:bignum/bignum.dart';
import "package:cipher/cipher.dart";
import "package:cipher/signers/rsa_signer.dart";
import "package:pointycastle/pointycastle.dart";
import "package:pointycastle/signers/rsa_signer.dart";

import "../benchmark/signer_benchmark.dart";
import "../../test/test/src/null_digest.dart";
Expand Down
4 changes: 2 additions & 2 deletions benchmark/src/ufixnum_benchmark.dart
Expand Up @@ -5,12 +5,12 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.api.ufixnum_benchmark;
library pointycastle.benchmark.api.ufixnum_benchmark;

import "dart:typed_data";

import "package:bignum/bignum.dart";
import "package:cipher/src/ufixnum.dart";
import "package:pointycastle/src/ufixnum.dart";
import "../benchmark/operation_benchmark.dart";

void main() {
Expand Down
4 changes: 2 additions & 2 deletions benchmark/stream/salsa20_benchmark.dart
Expand Up @@ -5,11 +5,11 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.benchmark.stream.salsa20_benchmark;
library pointycastle.benchmark.stream.salsa20_benchmark;

import "dart:typed_data";

import "package:cipher/cipher.dart";
import "package:pointycastle/pointycastle.dart";

import "../benchmark/stream_cipher_benchmark.dart";

Expand Down
6 changes: 3 additions & 3 deletions lib/adapters/stream_cipher_as_block_cipher.dart
Expand Up @@ -5,12 +5,12 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.impl.adapters.stream_cipher_as_block_cipher;
library pointycastle.impl.adapters.stream_cipher_as_block_cipher;

import "dart:typed_data";

import "package:cipher/api.dart";
import "package:cipher/src/impl/base_block_cipher.dart";
import "package:pointycastle/api.dart";
import "package:pointycastle/src/impl/base_block_cipher.dart";

/// An adapter to convert an [StreamCipher] to a [BlockCipher]
class StreamCipherAsBlockCipher extends BaseBlockCipher {
Expand Down
7 changes: 4 additions & 3 deletions lib/api.dart
Expand Up @@ -6,12 +6,13 @@
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

/**
* This is the API specification library for the cipher project.
* This is the API specification library for the Pointy Castle project.
*
* It declares all abstract types used by the cipher library. In addition, it implements the factories mechanism that allows
* It declares all abstract types used by the Pointy Castle library.
* In addition, it implements the factories mechanism that allows
* users to instantiate algorithms by their standard name.
*/
library cipher.api;
library pointycastle.api;

import "dart:typed_data";

Expand Down
4 changes: 2 additions & 2 deletions lib/asymmetric/api.dart
Expand Up @@ -5,12 +5,12 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.api.asymmetric;
library pointycastle.api.asymmetric;

import "dart:typed_data";

import "package:bignum/bignum.dart";
import "package:cipher/api.dart";
import "package:pointycastle/api.dart";

/// Base class for asymmetric keys in RSA
abstract class RSAAsymmetricKey implements AsymmetricKey {
Expand Down
8 changes: 4 additions & 4 deletions lib/asymmetric/pkcs1.dart
Expand Up @@ -5,13 +5,13 @@
// This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

library cipher.impl.asymmetric_block_cipher.pkcs1;
library pointycastle.impl.asymmetric_block_cipher.pkcs1;

import "dart:typed_data";

import "package:cipher/api.dart";
import "package:cipher/src/registry/registry.dart";
import "package:cipher/src/impl/base_asymmetric_block_cipher.dart";
import "package:pointycastle/api.dart";
import "package:pointycastle/src/registry/registry.dart";
import "package:pointycastle/src/impl/base_asymmetric_block_cipher.dart";

class PKCS1Encoding extends BaseAsymmetricBlockCipher {

Expand Down

0 comments on commit 31ef585

Please sign in to comment.