BeeCrypt  4.2.1
blockmode.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2000, 2002, 2005 X-Way Rights BV
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17  *
18  */
19 
27 #ifndef _BLOCKMODE_H
28 #define _BLOCKMODE_H
29 
30 #include "beecrypt/beecrypt.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
47 int blockEncryptECB(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
48 
60 int blockDecryptECB(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
61 
73 int blockEncryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
74 
86 int blockDecryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
87 
89 int blockEncryptCTR(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
90 
92 int blockDecryptCTR(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif
int blockDecryptCBC(const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
This function decrypts a number of data blocks in Cipher Block Chaining mode.
void blockCipherParam
Placeholder type definition for blockcipher parameters.
Definition: beecrypt.h:568
Holds information and pointers to code specific to each cipher.
Definition: beecrypt.h:644
int blockEncryptCBC(const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
This function encrypts a number of data blocks in Cipher Block Chaining mode.
BeeCrypt API, headers.
int blockEncryptCTR(const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
#define BEECRYPTAPI
Definition: api.h:52
int blockDecryptECB(const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
This function decrypts a number of data blocks in Electronic Code Book mode.
int blockEncryptECB(const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)
This function encrypts a number of data blocks in Electronic Code Book mode.
int blockDecryptCTR(const blockCipher *bc, blockCipherParam *bp, uint32_t *dst, const uint32_t *src, unsigned int nblocks)