aboutsummaryrefslogtreecommitdiffstats
path: root/src/constructs
diff options
context:
space:
mode:
authorlloyd <[email protected]>2010-06-22 13:43:18 +0000
committerlloyd <[email protected]>2010-06-22 13:43:18 +0000
commit54bac11c5d4e051f996951feb6a037b1de001329 (patch)
tree8cfa3b72ae36dcd156c4ab4dae1066ee3e021830 /src/constructs
parent991f744c5a3e9610a2e4af70ae5daeb7a943a38e (diff)
parent238869aed29c3d703650ce55404929dc7e3f31fb (diff)
propagate from branch 'net.randombit.botan' (head 647eeb4f4cf8fa4cf487cdc463d48f09fe18658e)
to branch 'net.randombit.botan.c++0x' (head 2539675db91883b11895ddc5244721e93c413321)
Diffstat (limited to 'src/constructs')
-rw-r--r--src/constructs/aont/package.h24
-rw-r--r--src/constructs/fpe/fpe.cpp4
-rw-r--r--src/constructs/fpe/fpe.h12
3 files changed, 23 insertions, 17 deletions
diff --git a/src/constructs/aont/package.h b/src/constructs/aont/package.h
index 211623347..34e0f35d5 100644
--- a/src/constructs/aont/package.h
+++ b/src/constructs/aont/package.h
@@ -1,6 +1,5 @@
/*
* Rivest's Package Tranform
-*
* (C) 2009 Jack Lloyd
*
* Distributed under the terms of the Botan license
@@ -16,12 +15,12 @@ namespace Botan {
/**
* Rivest's Package Tranform
-* @arg rng the random number generator to use
-* @arg cipher the block cipher to use
-* @arg input the input data buffer
-* @arg input_len the length of the input data in bytes
-* @arg output the output data buffer (must be at least
-* input_len + cipher->BLOCK_SIZE bytes long)
+* @param rng the random number generator to use
+* @param cipher the block cipher to use
+* @param input the input data buffer
+* @param input_len the length of the input data in bytes
+* @param output the output data buffer (must be at least
+* input_len + cipher->BLOCK_SIZE bytes long)
*/
void BOTAN_DLL aont_package(RandomNumberGenerator& rng,
BlockCipher* cipher,
@@ -30,12 +29,11 @@ void BOTAN_DLL aont_package(RandomNumberGenerator& rng,
/**
* Rivest's Package Tranform (Inversion)
-* @arg rng the random number generator to use
-* @arg cipher the block cipher to use
-* @arg input the input data buffer
-* @arg input_len the length of the input data in bytes
-* @arg output the output data buffer (must be at least
-* input_len - cipher->BLOCK_SIZE bytes long)
+* @param cipher the block cipher to use
+* @param input the input data buffer
+* @param input_len the length of the input data in bytes
+* @param output the output data buffer (must be at least
+* input_len - cipher->BLOCK_SIZE bytes long)
*/
void BOTAN_DLL aont_unpackage(BlockCipher* cipher,
const byte input[], u32bit input_len,
diff --git a/src/constructs/fpe/fpe.cpp b/src/constructs/fpe/fpe.cpp
index a0b3274b5..4eaff0eb6 100644
--- a/src/constructs/fpe/fpe.cpp
+++ b/src/constructs/fpe/fpe.cpp
@@ -136,7 +136,7 @@ BigInt FPE_Encryptor::operator()(u32bit round_no, const BigInt& R)
}
-/**
+/*
* Generic Z_n FPE encryption, FE1 scheme
*/
BigInt fpe_encrypt(const BigInt& n, const BigInt& X0,
@@ -164,7 +164,7 @@ BigInt fpe_encrypt(const BigInt& n, const BigInt& X0,
return X;
}
-/**
+/*
* Generic Z_n FPE decryption, FD1 scheme
*/
BigInt fpe_decrypt(const BigInt& n, const BigInt& X0,
diff --git a/src/constructs/fpe/fpe.h b/src/constructs/fpe/fpe.h
index 75f90247f..7a4a7861a 100644
--- a/src/constructs/fpe/fpe.h
+++ b/src/constructs/fpe/fpe.h
@@ -13,15 +13,23 @@
namespace Botan {
-/*
+/**
* Encrypt X from and onto the group Z_n using key and tweak
+* @param n the modulus
+* @param X the plaintext as a BigInt
+* @param key a random key
+* @param tweak will modify the ciphertext (think of as an IV)
*/
BigInt BOTAN_DLL fpe_encrypt(const BigInt& n, const BigInt& X,
const SymmetricKey& key,
const MemoryRegion<byte>& tweak);
-/*
+/**
* Decrypt X from and onto the group Z_n using key and tweak
+* @param n the modulus
+* @param X the ciphertext as a BigInt
+* @param key is the key used for encryption
+* @param tweak the same tweak used for encryption
*/
BigInt BOTAN_DLL fpe_decrypt(const BigInt& n, const BigInt& X,
const SymmetricKey& key,