aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2012-11-28 17:39:09 +0000
committerMike Buland <eichlan@xagasoft.com>2012-11-28 17:39:09 +0000
commit03e8c5ad314252cde58c53688c70b9f836a1d5b4 (patch)
tree6d26558aaae5e3758ca8b23c4086116e6d6b2636 /src
parent223e2986ad7752d38ce24d1cbeff47db98df1ae3 (diff)
downloadlibbu++-03e8c5ad314252cde58c53688c70b9f836a1d5b4.tar.gz
libbu++-03e8c5ad314252cde58c53688c70b9f836a1d5b4.tar.bz2
libbu++-03e8c5ad314252cde58c53688c70b9f836a1d5b4.tar.xz
libbu++-03e8c5ad314252cde58c53688c70b9f836a1d5b4.zip
More comments; moved the encryption system to unstable.
Diffstat (limited to '')
-rw-r--r--src/unstable/blowfish.cpp (renamed from src/experimental/blowfish.cpp)0
-rw-r--r--src/unstable/blowfish.h (renamed from src/experimental/blowfish.h)0
-rw-r--r--src/unstable/cipher.cpp (renamed from src/experimental/cipher.cpp)0
-rw-r--r--src/unstable/cipher.h (renamed from src/experimental/cipher.h)10
-rw-r--r--src/unstable/ciphermodecbc.cpp (renamed from src/experimental/ciphermodecbc.cpp)0
-rw-r--r--src/unstable/ciphermodecbc.h (renamed from src/experimental/ciphermodecbc.h)5
-rw-r--r--src/unstable/ciphermodecfb.cpp (renamed from src/experimental/ciphermodecfb.cpp)0
-rw-r--r--src/unstable/ciphermodecfb.h (renamed from src/experimental/ciphermodecfb.h)6
-rw-r--r--src/unstable/ciphermodeecb.cpp (renamed from src/experimental/ciphermodeecb.cpp)0
-rw-r--r--src/unstable/ciphermodeecb.h (renamed from src/experimental/ciphermodeecb.h)8
-rw-r--r--src/unstable/ciphermodeofb.cpp (renamed from src/experimental/ciphermodeofb.cpp)0
-rw-r--r--src/unstable/ciphermodeofb.h (renamed from src/experimental/ciphermodeofb.h)9
12 files changed, 38 insertions, 0 deletions
diff --git a/src/experimental/blowfish.cpp b/src/unstable/blowfish.cpp
index 3da32a9..3da32a9 100644
--- a/src/experimental/blowfish.cpp
+++ b/src/unstable/blowfish.cpp
diff --git a/src/experimental/blowfish.h b/src/unstable/blowfish.h
index b287bd4..b287bd4 100644
--- a/src/experimental/blowfish.h
+++ b/src/unstable/blowfish.h
diff --git a/src/experimental/cipher.cpp b/src/unstable/cipher.cpp
index e1ed0e5..e1ed0e5 100644
--- a/src/experimental/cipher.cpp
+++ b/src/unstable/cipher.cpp
diff --git a/src/experimental/cipher.h b/src/unstable/cipher.h
index 6e58613..eed73af 100644
--- a/src/experimental/cipher.h
+++ b/src/unstable/cipher.h
@@ -13,6 +13,16 @@
13 13
14namespace Bu 14namespace Bu
15{ 15{
16 /**
17 * Represents a nice base class for a stream filter block encryption scheme.
18 * This class handles efficient caching during reading and writing,
19 * encrypting and decrypting for block ciphers. For each individual cipher
20 * you only have to worry about the block encryption and decryption. Cipher
21 * modes are handled with seperate classes, see Bu::CipherModeCbc,
22 * Bu::CipherModeCfb, Bu::CipherModeEcb, and Bu::CipherModeOfb.
23 *
24 *
25 */
16 template<int iBlockSize> 26 template<int iBlockSize>
17 class Cipher : public Bu::Filter 27 class Cipher : public Bu::Filter
18 { 28 {
diff --git a/src/experimental/ciphermodecbc.cpp b/src/unstable/ciphermodecbc.cpp
index 169c1d3..169c1d3 100644
--- a/src/experimental/ciphermodecbc.cpp
+++ b/src/unstable/ciphermodecbc.cpp
diff --git a/src/experimental/ciphermodecbc.h b/src/unstable/ciphermodecbc.h
index b06a972..19fdd7d 100644
--- a/src/experimental/ciphermodecbc.h
+++ b/src/unstable/ciphermodecbc.h
@@ -6,6 +6,11 @@
6 6
7namespace Bu 7namespace Bu
8{ 8{
9 /**
10 * Cipher-block chaining mode. The Initialization Vector (IV) is fed into
11 * the first block, then each subsequent block is fed into the next making
12 * each block dependant on all previous blocks.
13 */
9 template<int iBlockSize, typename CipherType> 14 template<int iBlockSize, typename CipherType>
10 class CipherModeCbc : public CipherType 15 class CipherModeCbc : public CipherType
11 { 16 {
diff --git a/src/experimental/ciphermodecfb.cpp b/src/unstable/ciphermodecfb.cpp
index 271d371..271d371 100644
--- a/src/experimental/ciphermodecfb.cpp
+++ b/src/unstable/ciphermodecfb.cpp
diff --git a/src/experimental/ciphermodecfb.h b/src/unstable/ciphermodecfb.h
index 34c682f..1c9c5e9 100644
--- a/src/experimental/ciphermodecfb.h
+++ b/src/unstable/ciphermodecfb.h
@@ -6,6 +6,12 @@
6 6
7namespace Bu 7namespace Bu
8{ 8{
9 /**
10 * Cipher Feedback mode. This is very similar to the Cipher-block chaining
11 * mode, with a slight tweak (Bu::CipherModeCbc). Each block is still
12 * dependant on all previous blocks. Any corruption and the entire stream
13 * will be corrupt.
14 */
9 template<int iBlockSize, typename CipherType> 15 template<int iBlockSize, typename CipherType>
10 class CipherModeCfb : public CipherType 16 class CipherModeCfb : public CipherType
11 { 17 {
diff --git a/src/experimental/ciphermodeecb.cpp b/src/unstable/ciphermodeecb.cpp
index 8856304..8856304 100644
--- a/src/experimental/ciphermodeecb.cpp
+++ b/src/unstable/ciphermodeecb.cpp
diff --git a/src/experimental/ciphermodeecb.h b/src/unstable/ciphermodeecb.h
index cac2beb..c4a7f23 100644
--- a/src/experimental/ciphermodeecb.h
+++ b/src/unstable/ciphermodeecb.h
@@ -3,6 +3,14 @@
3 3
4namespace Bu 4namespace Bu
5{ 5{
6 /**
7 * Electronic Code Book mode. This cipher mode is the simplest, it's
8 * effectively a pass-through mode. It's the same as using the encryption
9 * scheme without a mode, but at least you absolutely know that you've got
10 * the correct mode. I recommend using this instead of the raw mode if for
11 * no other reason than it makes your code more self-documenting, and with
12 * optomization shouldn't add any extra calls to your code.
13 */
6 template<int iBlockSize, typename CipherType> 14 template<int iBlockSize, typename CipherType>
7 class CipherModeEcb : public CipherType 15 class CipherModeEcb : public CipherType
8 { 16 {
diff --git a/src/experimental/ciphermodeofb.cpp b/src/unstable/ciphermodeofb.cpp
index bebbce2..bebbce2 100644
--- a/src/experimental/ciphermodeofb.cpp
+++ b/src/unstable/ciphermodeofb.cpp
diff --git a/src/experimental/ciphermodeofb.h b/src/unstable/ciphermodeofb.h
index e1b5108..19d0f83 100644
--- a/src/experimental/ciphermodeofb.h
+++ b/src/unstable/ciphermodeofb.h
@@ -6,6 +6,15 @@
6 6
7namespace Bu 7namespace Bu
8{ 8{
9 /**
10 * Output Feedback Mode. This cipher mode is one of the most resiliant.
11 * Instead of encrypting your data directly it encrypts a "key stream" using
12 * the initialization vector, and then XORs those blocks with your stream
13 * blocks. This means that an error in your stream will still produce an
14 * error in the output, but it will not propegate. Also, with most
15 * encryption schemes error correction codes on the source data will still
16 * work on the encrypted data or decrypted output.
17 */
9 template<int iBlockSize, typename CipherType> 18 template<int iBlockSize, typename CipherType>
10 class CipherModeOfb : public CipherType 19 class CipherModeOfb : public CipherType
11 { 20 {