--- /dev/null
+-I. -I/usr/lib/gcc-lib/i386-redhat-linux/3.1/include -DHAVE_CONFIG_H -D_GNU_SOURCE -DHAVE_DEV_DSP -DHAVE_SYS_SOUNDCARD
+
++partial
++forcehints
+
+-warnposix
+
++unixlib
+
+-unrecogcomments # XXX ignore doxygen markings
+
++strict # lclint level
+
+# --- in progress
++likelybounds
+-bufferoverflowhigh
+
+-aliasunique
+-bitwisesigned
+-boolops
+-branchstate
+-castfcnptr
+-compdef
+-compdestroy
+-compmempass
+-evalorderuncon
+-globs
+-globstate
+-infloops
+-infloopsuncon # 2
+-internalglobs
+-mayaliasunique
+-mods
+-modobserveruncon
+-moduncon
+-mustfreefresh
+-mustfreeonly
+-namechecks
+-noeffect
+-noeffectuncon
+-nullderef
+-nullpass
+-nullptrarith
+-nullret
+-nullstate
+-paramuse
+-protoparammatch
++ptrnegate
+-retalias
+-retvalint
+-retvalother
+-shadow
+-shiftimplementation
+-shiftnegative
+-sizeoftype
+-type
+-unreachable
+-usedef
+-usereleased
+
+-dependenttrans
+-immediatetrans
+-observertrans
+-readonlytrans
+-statictrans
+-temptrans
+-unqualifiedtrans
+
+-looploopbreak
+-looploopcontinue
+-loopswitchbreak
+-switchswitchbreak
+
+-declundef
+-exportheader
+-exportheadervar
+-exportlocal
+-fcnuse
+-typeuse
+
+
+-elseifcomplete
+-whileempty
+
+# --- not-yet at strict level
+-exportconst # 3
+-exportfcn # 308
+-exporttype # 53
+-exportvar # 14
+-protoparamname # 826
+
+-ansi-reserved-internal # goofy
+
+-ptrarith # 212
+
+-mustdefine # 64
+-strictops # 23
+
+-impcheckedstrictglobs
+-impcheckedstrictstatics
+-strictbranchstate
+
+-forblock # 15
+-ifblock # 455
+-whileblock # 25
+-sys-dir-errors # 1296
+
+# --- not-yet at checks level
+-predboolptr # 88
+-ansi-reserved # goofy
+
+# --- not-yet at standard level
++boolint # 329
++charint # 3
++matchanyintegral # 573
AUTOMAKE_OPTIONS = gnu check-news no-dependencies
+LINT = splint
+
SUBDIRS = . $(MAYBE_SUB) tests docs gas masm
SUFFIXES = .s
bench:
(cd tests && $(MAKE) $(AM_MAKEFLAGS) bench)
+
+beecrypt.lcd: Makefile.am ${libbeecrypt_la_SOURCES} ${pkginclude_HEADERS} ${noinst_HEADERS}
+ $(LINT) $(DEFS) $(INCLUDES) ${libbeecrypt_la_SOURCES} -dump $@
+
+# XXX don't bite into gcj java dependencies (yet)
+libbeecrypt_splint_SOURCES = aes.c base64.c beecrypt.c blockmode.c blockpad.c blowfish.c dhaes.c dldp.c dlkp.c dlpk.c dlsvdp-dh.c dsa.c elgamal.c endianness.c entropy.c fips186.c hmac.c hmacmd5.c hmacsha1.c hmacsha256.c md5.c memchunk.c mp.c mpbarrett.c mpnumber.c mpprime.c mtprng.c pkcs1.c pkcs12.c rsa.c rsakp.c rsapk.c sha1.c sha256.c timestamp.c # cppglue.cxx
+
+.PHONY: sources
+sources:
+ @echo $(libbeecrypt_splint_SOURCES:%=beecrypt/%) | sed -e 's,beecrypt/javaglue.c,,'
+
+# XXX don't bite into javaglue.c (yet)
+.PHONY: lint
+lint:
+ $(LINT) $(DEFS) $(INCLUDES) $(libbeecrypt_splint_SOURCES:javaglue.c=) # tests/beetest.c
+
+.PHONY: listobjs
+listobjs:
+ @echo $(BEECRYPT_OBJECTS) > $@
+
+DOXYGEN = /usr/bin/doxygen .PHONY: doxygen
+doxygen apidocs: Doxyfile Doxyheader
+ rm -rf $@
+ mkdir -p $@
+ - [ -x ${DOXYGEN} ] && ${DOXYGEN}
* \retval -1 on failure.
*/
BEECRYPTAPI
-int aesSetup (aesParam* ap, const byte* key, size_t keybits, cipherOperation op);
+int aesSetup (aesParam* ap, const byte* key, size_t keybits, cipherOperation op)
+ /*@*/;
/*!\fn int aesSetIV(aesParam* ap, const byte* iv)
* \brief This function sets the Initialization Vector.
* \retval 0 on success.
*/
BEECRYPTAPI
-int aesSetIV (aesParam* ap, const byte* iv);
+int aesSetIV (aesParam* ap, const byte* iv)
+ /*@*/;
/*!\fn aesEncrypt(aesParam* ap, uint32_t* dst, const uint32_t* src)
* \brief This function performs the raw AES encryption; it encrypts one block
* \retval 0 on success.
*/
BEECRYPTAPI
-int aesEncrypt (aesParam* ap, uint32_t* dst, const uint32_t* src);
+int aesEncrypt (aesParam* ap, uint32_t* dst, const uint32_t* src)
+ /*@*/;
/*!\fn aesDecrypt(aesParam* ap, uint32_t* dst, const uint32_t* src)
* \brief This function performs the raw AES decryption; it decrypts one block
* \retval 0 on success.
*/
BEECRYPTAPI
-int aesDecrypt (aesParam* ap, uint32_t* dst, const uint32_t* src);
+int aesDecrypt (aesParam* ap, uint32_t* dst, const uint32_t* src)
+ /*@*/;
BEECRYPTAPI
-uint32_t* aesFeedback(aesParam* ap);
+uint32_t* aesFeedback(aesParam* ap)
+ /*@*/;
#ifdef __cplusplus
}
* \return (malloc'd) base64 string
*/
BEECRYPTAPI
-char* b64encode(const void* data, size_t ns);
+char* b64encode(const void* data, size_t ns)
+ /*@*/;
/*!
* Encode crc of binary input data into 5 bytes of base64 output.
* \return (malloc'd) base64 string
*/
BEECRYPTAPI
-char* b64crc(const unsigned char* data, size_t ns);
+char* b64crc(const unsigned char* data, size_t ns)
+ /*@*/;
/*!
* Decode chunks of 4 bytes of base64 input into 3 bytes of binary output.
* \return 0 on success, 1: s == NULL, 2: bad length, 3: bad char
*/
BEECRYPTAPI
-int b64decode(const char* s, void** datap, size_t* lenp);
+int b64decode(const char* s, void** datap, size_t* lenp)
+ /*@*/;
/*!
*/
BEECRYPTAPI
-char* b64enc(const memchunk*);
+char* b64enc(const memchunk*)
+ /*@*/;
/*!
*/
BEECRYPTAPI
-memchunk* b64dec(const char*);
+memchunk* b64dec(const char*)
+ /*@*/;
#ifdef __cplusplus
}
* \brief Prototype definition for an entropy-generating function.
* \ingroup ES_m
*/
-typedef int (*entropyNext)(byte*, size_t);
+typedef int (*entropyNext)(byte*, size_t)
+ /*@*/;
/*!\brief This struct holds information and pointers to code specific to each
* source of entropy.
* \return The number of implemented entropy sources.
*/
BEECRYPTAPI
-int entropySourceCount(void);
+int entropySourceCount(void)
+ /*@*/;
/*!\fn const entropySource* entropySourceGet(int n)
* \brief This function returns the \a n -th entropy source implemented by
* range.
*/
BEECRYPTAPI
-const entropySource* entropySourceGet(int n);
+const entropySource* entropySourceGet(int n)
+ /*@*/;
/*!\fn const entropySource* entropySourceFind(const char* name)
* \brief This function returns the entropy source specified by the given name.
* \return A pointer to an entropy source or null, if the name wasn't found.
*/
BEECRYPTAPI
-const entropySource* entropySourceFind(const char* name);
+const entropySource* entropySourceFind(const char* name)
+ /*@*/;
/*!\fn const entropySource* entropySourceDefault()
* \brief This functions returns the default entropy source; the default value
* \return A pointer to an entropy source or null, in case an error occured.
*/
BEECRYPTAPI
-const entropySource* entropySourceDefault(void);
+const entropySource* entropySourceDefault(void)
+ /*@*/;
/*!\fn int entropyGatherNext(byte* data, size_t size)
* \brief This function gathers \a size bytes of entropy into \a data.
* \retval -1 On failure.
*/
BEECRYPTAPI
-int entropyGatherNext(byte*, size_t);
+int entropyGatherNext(byte*, size_t)
+ /*@*/;
#ifdef __cplusplus
}
typedef void randomGeneratorParam;
-typedef int (*randomGeneratorSetup )(randomGeneratorParam*);
-typedef int (*randomGeneratorSeed )(randomGeneratorParam*, const byte*, size_t);
-typedef int (*randomGeneratorNext )(randomGeneratorParam*, byte*, size_t);
-typedef int (*randomGeneratorCleanup)(randomGeneratorParam*);
+typedef int (*randomGeneratorSetup )(randomGeneratorParam*)
+ /*@*/;
+typedef int (*randomGeneratorSeed )(randomGeneratorParam*, const byte*, size_t)
+ /*@*/;
+typedef int (*randomGeneratorNext )(randomGeneratorParam*, byte*, size_t)
+ /*@*/;
+typedef int (*randomGeneratorCleanup)(randomGeneratorParam*)
+ /*@*/;
/*
* The struct 'randomGenerator' holds information and pointers to code specific
#endif
BEECRYPTAPI
-int randomGeneratorCount(void);
+int randomGeneratorCount(void)
+ /*@*/;
BEECRYPTAPI
-const randomGenerator* randomGeneratorGet(int);
+const randomGenerator* randomGeneratorGet(int)
+ /*@*/;
BEECRYPTAPI
-const randomGenerator* randomGeneratorFind(const char*);
+const randomGenerator* randomGeneratorFind(const char*)
+ /*@*/;
BEECRYPTAPI
-const randomGenerator* randomGeneratorDefault(void);
+const randomGenerator* randomGeneratorDefault(void)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-int randomGeneratorContextInit(randomGeneratorContext*, const randomGenerator*);
+int randomGeneratorContextInit(randomGeneratorContext*, const randomGenerator*)
+ /*@*/;
BEECRYPTAPI
-int randomGeneratorContextFree(randomGeneratorContext*);
+int randomGeneratorContextFree(randomGeneratorContext*)
+ /*@*/;
BEECRYPTAPI
-int randomGeneratorContextNext(randomGeneratorContext*, byte*, size_t);
+int randomGeneratorContextNext(randomGeneratorContext*, byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int randomGeneratorContextSeed(randomGeneratorContext*, const byte*, size_t);
+int randomGeneratorContextSeed(randomGeneratorContext*, const byte*, size_t)
+ /*@*/;
#ifdef __cplusplus
}
*/
typedef void hashFunctionParam;
-typedef int (*hashFunctionReset )(hashFunctionParam*);
-typedef int (*hashFunctionUpdate)(hashFunctionParam*, const byte*, size_t);
-typedef int (*hashFunctionDigest)(hashFunctionParam*, byte*);
+typedef int (*hashFunctionReset )(hashFunctionParam*)
+ /*@*/;
+typedef int (*hashFunctionUpdate)(hashFunctionParam*, const byte*, size_t)
+ /*@*/;
+typedef int (*hashFunctionDigest)(hashFunctionParam*, byte*)
+ /*@*/;
/*
* The struct 'hashFunction' holds information and pointers to code specific
#endif
BEECRYPTAPI
-int hashFunctionCount(void);
+int hashFunctionCount(void)
+ /*@*/;
BEECRYPTAPI
-const hashFunction* hashFunctionGet(int);
+const hashFunction* hashFunctionGet(int)
+ /*@*/;
BEECRYPTAPI
-const hashFunction* hashFunctionFind(const char*);
+const hashFunction* hashFunctionFind(const char*)
+ /*@*/;
BEECRYPTAPI
-const hashFunction* hashFunctionDefault(void);
+const hashFunction* hashFunctionDefault(void)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-int hashFunctionContextInit(hashFunctionContext*, const hashFunction*);
+int hashFunctionContextInit(hashFunctionContext*, const hashFunction*)
+ /*@*/;
BEECRYPTAPI
-int hashFunctionContextFree(hashFunctionContext*);
+int hashFunctionContextFree(hashFunctionContext*)
+ /*@*/;
BEECRYPTAPI
-int hashFunctionContextReset(hashFunctionContext*);
+int hashFunctionContextReset(hashFunctionContext*)
+ /*@*/;
BEECRYPTAPI
-int hashFunctionContextUpdate(hashFunctionContext*, const byte*, size_t);
+int hashFunctionContextUpdate(hashFunctionContext*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hashFunctionContextUpdateMC(hashFunctionContext*, const memchunk*);
+int hashFunctionContextUpdateMC(hashFunctionContext*, const memchunk*)
+ /*@*/;
BEECRYPTAPI
-int hashFunctionContextUpdateMP(hashFunctionContext*, const mpnumber*);
+int hashFunctionContextUpdateMP(hashFunctionContext*, const mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int hashFunctionContextDigest(hashFunctionContext*, byte*);
+int hashFunctionContextDigest(hashFunctionContext*, byte*)
+ /*@*/;
BEECRYPTAPI
-int hashFunctionContextDigestMP(hashFunctionContext*, mpnumber*);
+int hashFunctionContextDigestMP(hashFunctionContext*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int hashFunctionContextDigestMatch(hashFunctionContext*, const mpnumber*);
+int hashFunctionContextDigestMatch(hashFunctionContext*, const mpnumber*)
+ /*@*/;
#ifdef __cplusplus
}
*/
typedef void keyedHashFunctionParam;
-typedef int (*keyedHashFunctionSetup )(keyedHashFunctionParam*, const byte*, size_t);
-typedef int (*keyedHashFunctionReset )(keyedHashFunctionParam*);
-typedef int (*keyedHashFunctionUpdate )(keyedHashFunctionParam*, const byte*, size_t);
-typedef int (*keyedHashFunctionDigest )(keyedHashFunctionParam*, byte*);
+typedef int (*keyedHashFunctionSetup )(keyedHashFunctionParam*, const byte*, size_t)
+ /*@*/;
+typedef int (*keyedHashFunctionReset )(keyedHashFunctionParam*)
+ /*@*/;
+typedef int (*keyedHashFunctionUpdate )(keyedHashFunctionParam*, const byte*, size_t)
+ /*@*/;
+typedef int (*keyedHashFunctionDigest )(keyedHashFunctionParam*, byte*)
+ /*@*/;
/*
* The struct 'keyedHashFunction' holds information and pointers to code
#endif
BEECRYPTAPI
-int keyedHashFunctionCount(void);
+int keyedHashFunctionCount(void)
+ /*@*/;
BEECRYPTAPI
-const keyedHashFunction* keyedHashFunctionGet(int);
+const keyedHashFunction* keyedHashFunctionGet(int)
+ /*@*/;
BEECRYPTAPI
-const keyedHashFunction* keyedHashFunctionFind(const char*);
+const keyedHashFunction* keyedHashFunctionFind(const char*)
+ /*@*/;
BEECRYPTAPI
-const keyedHashFunction* keyedHashFunctionDefault(void);
+const keyedHashFunction* keyedHashFunctionDefault(void)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-int keyedHashFunctionContextInit(keyedHashFunctionContext*, const keyedHashFunction*);
+int keyedHashFunctionContextInit(keyedHashFunctionContext*, const keyedHashFunction*)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextFree(keyedHashFunctionContext*);
+int keyedHashFunctionContextFree(keyedHashFunctionContext*)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextSetup(keyedHashFunctionContext*, const byte*, size_t);
+int keyedHashFunctionContextSetup(keyedHashFunctionContext*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextReset(keyedHashFunctionContext*);
+int keyedHashFunctionContextReset(keyedHashFunctionContext*)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextUpdate(keyedHashFunctionContext*, const byte*, size_t);
+int keyedHashFunctionContextUpdate(keyedHashFunctionContext*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextUpdateMC(keyedHashFunctionContext*, const memchunk*);
+int keyedHashFunctionContextUpdateMC(keyedHashFunctionContext*, const memchunk*)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextUpdateMP(keyedHashFunctionContext*, const mpnumber*);
+int keyedHashFunctionContextUpdateMP(keyedHashFunctionContext*, const mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextDigest(keyedHashFunctionContext*, byte*);
+int keyedHashFunctionContextDigest(keyedHashFunctionContext*, byte*)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextDigestMP(keyedHashFunctionContext*, mpnumber*);
+int keyedHashFunctionContextDigestMP(keyedHashFunctionContext*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int keyedHashFunctionContextDigestMatch(keyedHashFunctionContext*, const mpnumber*);
+int keyedHashFunctionContextDigestMatch(keyedHashFunctionContext*, const mpnumber*)
+ /*@*/;
#ifdef __cplusplus
}
/*!\brief Prototype definition for a setup function.
* \ingroup BC_m
*/
-typedef int (*blockCipherSetup )(blockCipherParam*, const byte*, size_t, cipherOperation);
+typedef int (*blockCipherSetup )(blockCipherParam*, const byte*, size_t, cipherOperation)
+ /*@*/;
/*!\typedef int (*blockCipherSetIV)(blockCipherPatam* bp, const byte* iv)
* \brief Prototype definition for an initialization vector setup function.
* \retval -1 on failure.
* \ingroup BC_m
*/
-typedef int (*blockCipherSetIV )(blockCipherParam*, const byte*);
+typedef int (*blockCipherSetIV )(blockCipherParam*, const byte*)
+ /*@*/;
/*!\typedef int (*blockCipherRawcrypt)(blockCipherParam* bp, uint32_t* dst, const uint32_t* src)
* \brief Prototype for a \e raw encryption or decryption function.
* \retval -1 on failure.
* \ingroup BC_m
*/
-typedef int (*blockCipherRawcrypt)(blockCipherParam*, uint32_t*, const uint32_t*);
+typedef int (*blockCipherRawcrypt)(blockCipherParam*, uint32_t*, const uint32_t*)
+ /*@*/;
/*!\typedef int (*blockCipherModcrypt)(blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks)
* \brief Prototype for a \e encryption or decryption function which operates
* \retval -1 on failure.
* \ingroup BC_m
*/
-typedef int (*blockCipherModcrypt)(blockCipherParam*, uint32_t*, const uint32_t*, unsigned int);
+typedef int (*blockCipherModcrypt)(blockCipherParam*, uint32_t*, const uint32_t*, unsigned int)
+ /*@*/;
-typedef uint32_t* (*blockCipherFeedback)(blockCipherParam*);
+typedef uint32_t* (*blockCipherFeedback)(blockCipherParam*)
+ /*@*/;
typedef struct
{
* \return The number of implemented blockciphers.
*/
BEECRYPTAPI
-int blockCipherCount(void);
+int blockCipherCount(void)
+ /*@*/;
/*!\fn const blockCipher* blockCipherGet(int n)
* \brief This function returns the \a n -th blockcipher implemented by
* range.
*/
BEECRYPTAPI
-const blockCipher* blockCipherGet(int);
+const blockCipher* blockCipherGet(int)
+ /*@*/;
/*!\fn const blockCIiher* blockCipherFind(const char* name)
* \brief This function returns the blockcipher specified by the given name.
* \return A pointer to a blockcipher or null, if the name wasn't found.
*/
BEECRYPTAPI
-const blockCipher* blockCipherFind(const char*);
+const blockCipher* blockCipherFind(const char*)
+ /*@*/;
/*!\fn const blockCipher* blockCipherDefault()
* \brief This functions returns the default blockcipher; the default value
* \return A pointer to a blockcipher or null, in case an error occured.
*/
BEECRYPTAPI
-const blockCipher* blockCipherDefault(void);
+const blockCipher* blockCipherDefault(void)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-int blockCipherContextInit(blockCipherContext*, const blockCipher*);
+int blockCipherContextInit(blockCipherContext*, const blockCipher*)
+ /*@*/;
BEECRYPTAPI
-int blockCipherContextSetup(blockCipherContext*, const byte*, size_t, cipherOperation);
+int blockCipherContextSetup(blockCipherContext*, const byte*, size_t, cipherOperation)
+ /*@*/;
BEECRYPTAPI
-int blockCipherContextSetIV(blockCipherContext*, const byte*);
+int blockCipherContextSetIV(blockCipherContext*, const byte*)
+ /*@*/;
BEECRYPTAPI
-int blockCipherContextFree(blockCipherContext*);
+int blockCipherContextFree(blockCipherContext*)
+ /*@*/;
BEECRYPTAPI
-int blockCipherContextECB(blockCipherContext*, uint32_t*, const uint32_t*, int);
+int blockCipherContextECB(blockCipherContext*, uint32_t*, const uint32_t*, int)
+ /*@*/;
BEECRYPTAPI
-int blockCipherContextCBC(blockCipherContext*, uint32_t*, const uint32_t*, int);
+int blockCipherContextCBC(blockCipherContext*, uint32_t*, const uint32_t*, int)
+ /*@*/;
#ifdef __cplusplus
}
* \retval 0 on success.
*/
BEECRYPTAPI
-int blockEncryptECB(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
+int blockEncryptECB(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks)
+ /*@*/;
/*!\fn int blockDecryptECB(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks)
* \brief This function decrypts a number of data blocks in Electronic Code
* \retval 0 on success.
*/
BEECRYPTAPI
-int blockDecryptECB(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
+int blockDecryptECB(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks)
+ /*@*/;
/*!\fn int blockEncryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks)
* \brief This function encrypts a number of data blocks in Cipher Block
* \retval 0 on success.
*/
BEECRYPTAPI
-int blockEncryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
+int blockEncryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks)
+ /*@*/;
/*!\fn int blockDecryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks)
* \brief This function decrypts a number of data blocks in Cipher Block
* \retval 0 on success.
*/
BEECRYPTAPI
-int blockDecryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks);
+int blockDecryptCBC(const blockCipher* bc, blockCipherParam* bp, uint32_t* dst, const uint32_t* src, unsigned int nblocks)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-memchunk* pkcs5Pad (size_t, memchunk*);
+memchunk* pkcs5Pad (size_t, memchunk*)
+ /*@*/;
BEECRYPTAPI
-memchunk* pkcs5Unpad(size_t, memchunk*);
+memchunk* pkcs5Unpad(size_t, memchunk*)
+ /*@*/;
BEECRYPTAPI
-memchunk* pkcs5PadCopy (size_t, const memchunk*);
+memchunk* pkcs5PadCopy (size_t, const memchunk*)
+ /*@*/;
BEECRYPTAPI
-memchunk* pkcs5UnpadCopy(size_t, const memchunk*);
+memchunk* pkcs5UnpadCopy(size_t, const memchunk*)
+ /*@*/;
#ifdef __cplusplus
}
* \retval -1 on failure.
*/
BEECRYPTAPI
-int blowfishSetup (blowfishParam*, const byte*, size_t, cipherOperation);
+int blowfishSetup (blowfishParam*, const byte*, size_t, cipherOperation)
+ /*@*/;
/*!\fn int blowfishSetIV(blowfishParam* bp, const byte* iv)
* \brief This function sets the Initialization Vector.
* \retval 0 on success.
*/
BEECRYPTAPI
-int blowfishSetIV (blowfishParam*, const byte*);
+int blowfishSetIV (blowfishParam*, const byte*)
+ /*@*/;
/*!\fn blowfishEncrypt(blowfishParam* bp, uint32_t* dst, const uint32_t* src)
* \brief This function performs the Blowfish encryption; it encrypts one block
* \retval 0 on success.
*/
BEECRYPTAPI
-int blowfishEncrypt (blowfishParam*, uint32_t*, const uint32_t*);
+int blowfishEncrypt (blowfishParam*, uint32_t*, const uint32_t*)
+ /*@*/;
/*!\fn blowfishDecrypt(blowfishParam* bp, uint32_t* dst, const uint32_t* src)
* \brief This function performs the Blowfish decryption; it Rderypts one block
* \retval 0 on success.
*/
BEECRYPTAPI
-int blowfishDecrypt (blowfishParam*, uint32_t*, const uint32_t*);
+int blowfishDecrypt (blowfishParam*, uint32_t*, const uint32_t*)
+ /*@*/;
BEECRYPTAPI
-uint32_t* blowfishFeedback(blowfishParam*);
+uint32_t* blowfishFeedback(blowfishParam*)
+ /*@*/;
#ifdef __cplusplus
}
}
static int dhaes_pContextSetup(dhaes_pContext* ctxt, const mpnumber* private, const mpnumber* public, const mpnumber* message, cipherOperation op)
+ /*@*/
{
register int rc;
#endif
BEECRYPTAPI
-int dhaes_pUsable(const dhaes_pParameters*);
+int dhaes_pUsable(const dhaes_pParameters*)
+ /*@*/;
BEECRYPTAPI
-int dhaes_pContextInit (dhaes_pContext*, const dhaes_pParameters*);
+int dhaes_pContextInit (dhaes_pContext*, const dhaes_pParameters*)
+ /*@*/;
BEECRYPTAPI
-int dhaes_pContextInitDecrypt(dhaes_pContext*, const dhaes_pParameters*, const mpnumber*);
+int dhaes_pContextInitDecrypt(dhaes_pContext*, const dhaes_pParameters*, const mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int dhaes_pContextInitEncrypt(dhaes_pContext*, const dhaes_pParameters*, const mpnumber*);
+int dhaes_pContextInitEncrypt(dhaes_pContext*, const dhaes_pParameters*, const mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int dhaes_pContextFree (dhaes_pContext*);
+int dhaes_pContextFree (dhaes_pContext*)
+ /*@*/;
BEECRYPTAPI
-memchunk* dhaes_pContextEncrypt(dhaes_pContext*, mpnumber*, mpnumber*, const memchunk*, randomGeneratorContext*);
+memchunk* dhaes_pContextEncrypt(dhaes_pContext*, mpnumber*, mpnumber*, const memchunk*, randomGeneratorContext*)
+ /*@*/;
BEECRYPTAPI
-memchunk* dhaes_pContextDecrypt(dhaes_pContext*, const mpnumber*, const mpnumber*, const memchunk*);
+memchunk* dhaes_pContextDecrypt(dhaes_pContext*, const mpnumber*, const mpnumber*, const memchunk*)
+ /*@*/;
#ifdef __cplusplus
}
/*!\addtogroup DL_m
* \{
*/
-static int dldp_pgoqGenerator_w(dldp_p*, randomGeneratorContext*, mpw*);
-static int dldp_pgonGenerator_w(dldp_p*, randomGeneratorContext*, mpw*);
+static int dldp_pgoqGenerator_w(dldp_p*, randomGeneratorContext*, mpw*)
+ /*@*/;
+static int dldp_pgonGenerator_w(dldp_p*, randomGeneratorContext*, mpw*)
+ /*@*/;
int dldp_pPrivate(const dldp_p* dp, randomGeneratorContext* rgc, mpnumber* x)
{
*/
BEECRYPTAPI
-int dldp_pInit(dldp_p*);
+int dldp_pInit(dldp_p*)
+ /*@*/;
BEECRYPTAPI
-int dldp_pFree(dldp_p*);
+int dldp_pFree(dldp_p*)
+ /*@*/;
BEECRYPTAPI
-int dldp_pCopy(dldp_p*, const dldp_p*);
+int dldp_pCopy(dldp_p*, const dldp_p*)
+ /*@*/;
/*
* Functions for generating keys
*/
BEECRYPTAPI
-int dldp_pPrivate (const dldp_p*, randomGeneratorContext*, mpnumber*);
+int dldp_pPrivate (const dldp_p*, randomGeneratorContext*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int dldp_pPrivate_s(const dldp_p*, randomGeneratorContext*, mpnumber*, size_t);
+int dldp_pPrivate_s(const dldp_p*, randomGeneratorContext*, mpnumber*, size_t)
+ /*@*/;
BEECRYPTAPI
-int dldp_pPublic (const dldp_p*, const mpnumber*, mpnumber*);
+int dldp_pPublic (const dldp_p*, const mpnumber*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int dldp_pPair (const dldp_p*, randomGeneratorContext*, mpnumber*, mpnumber*);
+int dldp_pPair (const dldp_p*, randomGeneratorContext*, mpnumber*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-int dldp_pPair_s (const dldp_p*, randomGeneratorContext*, mpnumber*, mpnumber*, size_t);
+int dldp_pPair_s (const dldp_p*, randomGeneratorContext*, mpnumber*, mpnumber*, size_t)
+ /*@*/;
/*
* Function for comparing domain parameters
*/
BEECRYPTAPI
-int dldp_pEqual (const dldp_p*, const dldp_p*);
+int dldp_pEqual (const dldp_p*, const dldp_p*)
+ /*@*/;
/*
* Functions for generating and validating dldp_pgoq variant domain parameters
*/
BEECRYPTAPI
-int dldp_pgoqMake (dldp_p*, randomGeneratorContext*, size_t, size_t, int);
+int dldp_pgoqMake (dldp_p*, randomGeneratorContext*, size_t, size_t, int)
+ /*@*/;
BEECRYPTAPI
-int dldp_pgoqMakeSafe (dldp_p*, randomGeneratorContext*, size_t);
+int dldp_pgoqMakeSafe (dldp_p*, randomGeneratorContext*, size_t)
+ /*@*/;
BEECRYPTAPI
-int dldp_pgoqGenerator(dldp_p*, randomGeneratorContext*);
+int dldp_pgoqGenerator(dldp_p*, randomGeneratorContext*)
+ /*@*/;
BEECRYPTAPI
-int dldp_pgoqValidate (const dldp_p*, randomGeneratorContext*, int);
+int dldp_pgoqValidate (const dldp_p*, randomGeneratorContext*, int)
+ /*@*/;
/*
* Functions for generating and validating dldp_pgon variant domain parameters
*/
BEECRYPTAPI
-int dldp_pgonMake (dldp_p*, randomGeneratorContext*, size_t, size_t);
+int dldp_pgonMake (dldp_p*, randomGeneratorContext*, size_t, size_t)
+ /*@*/;
BEECRYPTAPI
-int dldp_pgonMakeSafe (dldp_p*, randomGeneratorContext*, size_t);
+int dldp_pgonMakeSafe (dldp_p*, randomGeneratorContext*, size_t)
+ /*@*/;
BEECRYPTAPI
-int dldp_pgonGenerator(dldp_p*, randomGeneratorContext*);
+int dldp_pgonGenerator(dldp_p*, randomGeneratorContext*)
+ /*@*/;
BEECRYPTAPI
-int dldp_pgonValidate (const dldp_p*, randomGeneratorContext*);
+int dldp_pgonValidate (const dldp_p*, randomGeneratorContext*)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-int dlkp_pPair(dlkp_p*, randomGeneratorContext*, const dldp_p*);
+int dlkp_pPair(dlkp_p*, randomGeneratorContext*, const dldp_p*)
+ /*@*/;
BEECRYPTAPI
-int dlkp_pInit(dlkp_p*);
+int dlkp_pInit(dlkp_p*)
+ /*@*/;
BEECRYPTAPI
-int dlkp_pFree(dlkp_p*);
+int dlkp_pFree(dlkp_p*)
+ /*@*/;
BEECRYPTAPI
-int dlkp_pCopy(dlkp_p*, const dlkp_p*);
+int dlkp_pCopy(dlkp_p*, const dlkp_p*)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-int dlpk_pInit(dlpk_p*);
+int dlpk_pInit(dlpk_p*)
+ /*@*/;
BEECRYPTAPI
-int dlpk_pFree(dlpk_p*);
+int dlpk_pFree(dlpk_p*)
+ /*@*/;
BEECRYPTAPI
-int dlpk_pCopy(dlpk_p*, const dlpk_p*);
+int dlpk_pCopy(dlpk_p*, const dlpk_p*)
+ /*@*/;
BEECRYPTAPI
-int dlpk_pEqual(const dlpk_p*, const dlpk_p*);
+int dlpk_pEqual(const dlpk_p*, const dlpk_p*)
+ /*@*/;
BEECRYPTAPI
-int dlpk_pgoqValidate(const dlpk_p*, randomGeneratorContext*, int cofactor);
+int dlpk_pgoqValidate(const dlpk_p*, randomGeneratorContext*, int cofactor)
+ /*@*/;
BEECRYPTAPI
-int dlpk_pgonValidate(const dlpk_p*, randomGeneratorContext*);
+int dlpk_pgonValidate(const dlpk_p*, randomGeneratorContext*)
+ /*@*/;
#ifdef __cplusplus
}
typedef dlkp_p dhkp;
BEECRYPTAPI
-int dlsvdp_pDHSecret(const dhparam*, const mpnumber*, const mpnumber*, mpnumber*);
+int dlsvdp_pDHSecret(const dhparam*, const mpnumber*, const mpnumber*, mpnumber*)
+ /*@*/;
#ifdef __cplusplus
}
* \retval -1 on failure.
*/
BEECRYPTAPI
-int dsasign(const mpbarrett* p, const mpbarrett* q, const mpnumber* g, randomGeneratorContext*, const mpnumber* hm, const mpnumber* x, mpnumber* r, mpnumber* s);
+int dsasign(const mpbarrett* p, const mpbarrett* q, const mpnumber* g, randomGeneratorContext*, const mpnumber* hm, const mpnumber* x, mpnumber* r, mpnumber* s)
+ /*@*/;
/*!\fn int dsavrfy(const mpbarrett* p, const mpbarrett* q, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s)
* \brief This function performs a raw DSA verification.
* \retval 0 on failure.
*/
BEECRYPTAPI
-int dsavrfy(const mpbarrett* p, const mpbarrett* q, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s);
+int dsavrfy(const mpbarrett* p, const mpbarrett* q, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s)
+ /*@*/;
/*!\fn int dsaparamMake(dsaparam* dp, randomGeneratorContext* rgc, size_t psize)
* \brief This function generates a set of DSA parameters.
* \retval -1 on failure.
*/
BEECRYPTAPI
-int dsaparamMake(dsaparam*, randomGeneratorContext*, size_t);
+int dsaparamMake(dsaparam*, randomGeneratorContext*, size_t)
+ /*@*/;
#ifdef __cplusplus
}
* \retval -1 on failure.
*/
BEECRYPTAPI
-int elgv1sign(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, randomGeneratorContext*, const mpnumber* hm, const mpnumber* x, mpnumber* r, mpnumber* s);
+int elgv1sign(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, randomGeneratorContext*, const mpnumber* hm, const mpnumber* x, mpnumber* r, mpnumber* s)
+ /*@*/;
/*!\fn int elgv1vrfy(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s)
* \brief This function performs raw ElGamal verification, variant 1.
* \retval 0 on failure.
*/
BEECRYPTAPI
-int elgv3sign(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, randomGeneratorContext*, const mpnumber* hm, const mpnumber* x, mpnumber* r, mpnumber* s);
+int elgv3sign(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, randomGeneratorContext*, const mpnumber* hm, const mpnumber* x, mpnumber* r, mpnumber* s)
+ /*@*/;
/*!\fn int elgv3sign(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, randomGeneratorContext* rgc, const mpnumber* hm, const mpnumber* x, mpnumber* r, mpnumber* s)
* \brief This function performs raw ElGamal signing, variant 3.
* \retval -1 on failure.
*/
BEECRYPTAPI
-int elgv1vrfy(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s);
+int elgv1vrfy(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s)
+ /*@*/;
/*!\fn int elgv3vrfy(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s)
* \brief This function performs raw ElGamal verification, variant 3.
* \retval 0 on failure.
*/
BEECRYPTAPI
-int elgv3vrfy(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s);
+int elgv3vrfy(const mpbarrett* p, const mpbarrett* n, const mpnumber* g, const mpnumber* hm, const mpnumber* y, const mpnumber* r, const mpnumber* s)
+ /*@*/;
#ifdef __cplusplus
}
((n & ((int64_t) 0xff) << 56) >> 56) );
}
#else
- int16_t swap16 (int16_t);
-uint16_t swapu16(uint16_t);
- int32_t swap32 (int32_t);
-uint32_t swapu32(uint32_t);
- int64_t swap64 (int64_t);
+ int16_t swap16 (int16_t)
+ /*@*/;
+uint16_t swapu16(uint16_t)
+ /*@*/;
+ int32_t swap32 (int32_t)
+ /*@*/;
+uint32_t swapu32(uint32_t)
+ /*@*/;
+ int64_t swap64 (int64_t)
+ /*@*/;
#endif
#ifdef __cplusplus
* return an error in case they are all zeroes or ones.
*/
static int entropy_noise_filter(void* sampledata, int samplecount, int samplesize, int channels, int swap)
+ /*@*/
{
register int rc = 0, i;
#else
static int entropy_noise_gather(int fd, int samplesize, int channels, int swap, int timeout, byte* data, size_t size)
#endif
+ /*@*/
{
size_t randombits = size << 3;
byte temp = 0;
#if HAVE_SYS_STAT_H
static int statdevice(const char *device)
+ /*@*/
{
struct stat s;
#endif
static int opendevice(const char *device)
+ /*@*/
{
register int fd;
/*!\ingroup ES_random_m ES_urandom_m
*/
static int entropy_randombits(int fd, int timeout, byte* data, size_t size)
+ /*@*/
{
register int rc;
/*!\ingroup ES_tty_m
*/
static int entropy_ttybits(int fd, byte* data, size_t size)
+ /*@*/
{
byte dummy;
int entropy_wincrypt(byte*, size_t);
#else
#if HAVE_DEV_AUDIO
-int entropy_dev_audio (byte*, size_t);
+int entropy_dev_audio (byte*, size_t)
+ /*@*/;
#endif
#if HAVE_DEV_DSP
-int entropy_dev_dsp (byte*, size_t);
+int entropy_dev_dsp (byte*, size_t)
+ /*@*/;
#endif
#if HAVE_DEV_RANDOM
-int entropy_dev_random (byte*, size_t);
+int entropy_dev_random (byte*, size_t)
+ /*@*/;
#endif
#if HAVE_DEV_URANDOM
-int entropy_dev_urandom(byte*, size_t);
+int entropy_dev_urandom(byte*, size_t)
+ /*@*/;
#endif
#if HAVE_DEV_TTY
-int entropy_dev_tty (byte*, size_t);
+int entropy_dev_tty (byte*, size_t)
+ /*@*/;
#endif
#endif
};
static int fips186init(register sha1Param* p)
+ /*@*/
{
memcpy(p->h, fips186hinit, 5 * sizeof(uint32_t));
return 0;
extern BEECRYPTAPI const randomGenerator fips186prng;
BEECRYPTAPI
-int fips186Setup (fips186Param*);
+int fips186Setup (fips186Param*)
+ /*@*/;
BEECRYPTAPI
-int fips186Seed (fips186Param*, const byte*, size_t);
+int fips186Seed (fips186Param*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int fips186Next (fips186Param*, byte*, size_t);
+int fips186Next (fips186Param*, byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int fips186Cleanup(fips186Param*);
+int fips186Cleanup(fips186Param*)
+ /*@*/;
#ifdef __cplusplus
}
/* not used directly as keyed hash function, but instead used as generic methods */
BEECRYPTAPI
-int hmacSetup ( byte*, byte*, const hashFunction*, hashFunctionParam*, const byte*, size_t);
+int hmacSetup ( byte*, byte*, const hashFunction*, hashFunctionParam*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hmacReset (const byte*, const hashFunction*, hashFunctionParam*);
+int hmacReset (const byte*, const hashFunction*, hashFunctionParam*)
+ /*@*/;
BEECRYPTAPI
-int hmacUpdate( const hashFunction*, hashFunctionParam*, const byte*, size_t);
+int hmacUpdate( const hashFunction*, hashFunctionParam*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hmacDigest( const byte*, const hashFunction*, hashFunctionParam*, byte*);
+int hmacDigest( const byte*, const hashFunction*, hashFunctionParam*, byte*)
+ /*@*/;
#ifdef __cplusplus
}
extern BEECRYPTAPI const keyedHashFunction hmacmd5;
BEECRYPTAPI
-int hmacmd5Setup (hmacmd5Param*, const byte*, size_t);
+int hmacmd5Setup (hmacmd5Param*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hmacmd5Reset (hmacmd5Param*);
+int hmacmd5Reset (hmacmd5Param*)
+ /*@*/;
BEECRYPTAPI
-int hmacmd5Update(hmacmd5Param*, const byte*, size_t);
+int hmacmd5Update(hmacmd5Param*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hmacmd5Digest(hmacmd5Param*, byte*);
+int hmacmd5Digest(hmacmd5Param*, byte*)
+ /*@*/;
#ifdef __cplusplus
}
extern BEECRYPTAPI const keyedHashFunction hmacsha1;
BEECRYPTAPI
-int hmacsha1Setup (hmacsha1Param*, const byte*, size_t);
+int hmacsha1Setup (hmacsha1Param*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hmacsha1Reset (hmacsha1Param*);
+int hmacsha1Reset (hmacsha1Param*)
+ /*@*/;
BEECRYPTAPI
-int hmacsha1Update(hmacsha1Param*, const byte*, size_t);
+int hmacsha1Update(hmacsha1Param*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hmacsha1Digest(hmacsha1Param*, byte*);
+int hmacsha1Digest(hmacsha1Param*, byte*)
+ /*@*/;
#ifdef __cplusplus
}
extern BEECRYPTAPI const keyedHashFunction hmacsha256;
BEECRYPTAPI
-int hmacsha256Setup (hmacsha256Param*, const byte*, size_t);
+int hmacsha256Setup (hmacsha256Param*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hmacsha256Reset (hmacsha256Param*);
+int hmacsha256Reset (hmacsha256Param*)
+ /*@*/;
BEECRYPTAPI
-int hmacsha256Update(hmacsha256Param*, const byte*, size_t);
+int hmacsha256Update(hmacsha256Param*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int hmacsha256Digest(hmacsha256Param*, byte*);
+int hmacsha256Digest(hmacsha256Param*, byte*)
+ /*@*/;
#ifdef __cplusplus
}
}
static void md5Finish(md5Param* mp)
+ /*@*/
{
register byte *ptr = ((byte *) mp->data) + mp->offset++;
* \retval 0 on success.
*/
BEECRYPTAPI
-void md5Process(md5Param* mp);
+void md5Process(md5Param* mp)
+ /*@*/;
/*!\fn int md5Reset(md5Param* mp)
* \brief This function resets the parameter block so that it's ready for a
* \retval 0 on success.
*/
BEECRYPTAPI
-int md5Reset (md5Param* mp);
+int md5Reset (md5Param* mp)
+ /*@*/;
/*!\fn int md5Update(md5Param* mp, const byte* data, size_t size)
* \brief This function should be used to pass successive blocks of data
* \retval 0 on success.
*/
BEECRYPTAPI
-int md5Update (md5Param* mp, const byte* data, size_t size);
+int md5Update (md5Param* mp, const byte* data, size_t size)
+ /*@*/;
/*!\fn int md5Digest(md5Param* mp, byte* digest)
* \brief This function finishes the current hash computation and copies
* \retval 0 on success.
*/
BEECRYPTAPI
-int md5Digest (md5Param* mp, byte* digest);
+int md5Digest (md5Param* mp, byte* digest)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-memchunk* memchunkAlloc(size_t);
+memchunk* memchunkAlloc(size_t)
+ /*@*/;
BEECRYPTAPI
-void memchunkWipe(memchunk*);
+void memchunkWipe(memchunk*)
+ /*@*/;
BEECRYPTAPI
-void memchunkFree(memchunk*);
+void memchunkFree(memchunk*)
+ /*@*/;
BEECRYPTAPI
-memchunk* memchunkResize(memchunk*, size_t);
+memchunk* memchunkResize(memchunk*, size_t)
+ /*@*/;
BEECRYPTAPI
-memchunk* memchunkClone(const memchunk*);
+memchunk* memchunkClone(const memchunk*)
+ /*@*/;
#ifdef __cplusplus
}
# define mpcopy(size, dst, src) memcpy(dst, src, MP_WORDS_TO_BYTES(size))
#else
BEECRYPTAPI
-void mpcopy(size_t size, mpw* dest, const mpw* src);
+void mpcopy(size_t size, mpw* dest, const mpw* src)
+ /*@*/;
#endif
#ifndef ASM_MPMOVE
# define mpmove(size, dst, src) memmove(dst, src, MP_WORDS_TO_BYTES(size))
#else
BEECRYPTAPI
-void mpmove(size_t size, mpw* dest, const mpw* src);
+void mpmove(size_t size, mpw* dest, const mpw* src)
+ /*@*/;
#endif
/*!\fn void mpzero(size_t size, mpw* data)
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-void mpzero(size_t size, mpw* data);
+void mpzero(size_t size, mpw* data)
+ /*@*/;
/*!\fn void mpfill(size_t size, mpw* data, mpw fill)
* \brief This function fills each word of a multi-precision integer with a
* \param fill The value fill the data with.
*/
BEECRYPTAPI
-void mpfill(size_t size, mpw* data, mpw fill);
+void mpfill(size_t size, mpw* data, mpw fill)
+ /*@*/;
/*!\fn int mpodd(size_t size, const mpw* data)
* \brief This functions tests if a multi-precision integer is odd.
* \retval 0 if even
*/
BEECRYPTAPI
-int mpodd (size_t size, const mpw* data);
+int mpodd (size_t size, const mpw* data)
+ /*@*/;
/*!\fn int mpeven(size_t size, const mpw* data)
* \brief This function tests if a multi-precision integer is even.
* \retval 0 if odd
*/
BEECRYPTAPI
-int mpeven(size_t size, const mpw* data);
+int mpeven(size_t size, const mpw* data)
+ /*@*/;
/*!\fn int mpz(size_t size, const mpw* data)
* \brief This function tests if a multi-precision integer is zero.
* \retval 0 if not zero
*/
BEECRYPTAPI
-int mpz (size_t size, const mpw* data);
+int mpz (size_t size, const mpw* data)
+ /*@*/;
/*!\fn int mpnz(size_t size, const mpw* data)
* \brief This function tests if a multi-precision integer is not zero.
* \retval 0 if zero
*/
BEECRYPTAPI
-int mpnz (size_t size, const mpw* data);
+int mpnz (size_t size, const mpw* data)
+ /*@*/;
/*!\fn int mpeq(size_t size, const mpw* xdata, const mpw* ydata)
* \brief This function tests if two multi-precision integers of the same size
* \retval 0 if not equal
*/
BEECRYPTAPI
-int mpeq (size_t size, const mpw* xdata, const mpw* ydata);
+int mpeq (size_t size, const mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mpne(size_t size, const mpw* xdata, const mpw* ydata)
* \brief This function tests if two multi-precision integers of the same size
* \retval 0 if equal
*/
BEECRYPTAPI
-int mpne (size_t size, const mpw* xdata, const mpw* ydata);
+int mpne (size_t size, const mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mpgt(size_t size, const mpw* xdata, const mpw* ydata)
* \brief This function tests if the first of two multi-precision integers
* \retval 0 if less or equal
*/
BEECRYPTAPI
-int mpgt (size_t size, const mpw* xdata, const mpw* ydata);
+int mpgt (size_t size, const mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mplt(size_t size, const mpw* xdata, const mpw* ydata)
* \brief This function tests if the first of two multi-precision integers
* \retval 0 if greater or equal
*/
BEECRYPTAPI
-int mplt (size_t size, const mpw* xdata, const mpw* ydata);
+int mplt (size_t size, const mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mpge(size_t size, const mpw* xdata, const mpw* ydata)
* \brief This function tests if the first of two multi-precision integers
* \retval 0 if less
*/
BEECRYPTAPI
-int mpge (size_t size, const mpw* xdata, const mpw* ydata);
+int mpge (size_t size, const mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mple(size_t size, const mpw* xdata, const mpw* ydata)
* \brief This function tests if the first of two multi-precision integers
* \retval 0 if greater
*/
BEECRYPTAPI
-int mple (size_t size, const mpw* xdata, const mpw* ydata);
+int mple (size_t size, const mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mpeqx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function tests if two multi-precision integers of different
* \retval 0 if not equal
*/
BEECRYPTAPI
-int mpeqx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata);
+int mpeqx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn int mpnex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function tests if two multi-precision integers of different
* \retval 0 if not equal
*/
BEECRYPTAPI
-int mpnex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata);
+int mpnex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn int mpgtx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function tests if the first of two multi-precision integers
* \retval 0 if less or equal
*/
BEECRYPTAPI
-int mpgtx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata);
+int mpgtx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn int mpltx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function tests if the first of two multi-precision integers
* \retval 0 if greater or equal
*/
BEECRYPTAPI
-int mpltx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata);
+int mpltx(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn int mpgex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function tests if the first of two multi-precision integers
* \retval 0 if less
*/
BEECRYPTAPI
-int mpgex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata);
+int mpgex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn int mplex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function tests if the first of two multi-precision integers
* \retval 0 if greater
*/
BEECRYPTAPI
-int mplex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata);
+int mplex(size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn int mpisone(size_t size, const mpw* data)
* \brief This functions tests if the value of a multi-precision integer is
* \retval 0 if not one
*/
BEECRYPTAPI
-int mpisone(size_t size, const mpw* data);
+int mpisone(size_t size, const mpw* data)
+ /*@*/;
/*!\fn int mpistwo(size_t size, const mpw* data)
* \brief This function tests if the value of a multi-precision integer is
* \retval 0 if not two
*/
BEECRYPTAPI
-int mpistwo(size_t size, const mpw* data);
+int mpistwo(size_t size, const mpw* data)
+ /*@*/;
-/*!\fn int mpleone(size_t size, const mpw* data);
+/*!\fn int mpleone(size_t size, const mpw* data)
* \brief This function tests if the value of a multi-precision integer is
* less than or equal to one.
* \param size The size of the multi-precision integer.
* \retval 0 if greater than one.
*/
BEECRYPTAPI
-int mpleone(size_t size, const mpw* data);
+int mpleone(size_t size, const mpw* data)
+ /*@*/;
-/*!\fn int mpeqmone(size_t size, const mpw* xdata, const mpw* ydata);
+/*!\fn int mpeqmone(size_t size, const mpw* xdata, const mpw* ydata)
* \brief This function tests if multi-precision integer x is equal to y
* minus one.
* \param size The size of the multi-precision integers.
* \retval 0 if greater than one.
*/
BEECRYPTAPI
-int mpeqmone(size_t size, const mpw* xdata, const mpw* ydata);
+int mpeqmone(size_t size, const mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mpmsbset(size_t size, const mpw* data)
* \brief This function tests if the most significant bit of a multi-precision
* \retval 0 if not set
*/
BEECRYPTAPI
-int mpmsbset(size_t size, const mpw* data);
+int mpmsbset(size_t size, const mpw* data)
+ /*@*/;
/*!\fn int mplsbset(size_t size, const mpw* data)
* \brief This function tests if the leiast significant bit of a multi-precision
* \retval 0 if not set
*/
BEECRYPTAPI
-int mplsbset(size_t size, const mpw* data);
+int mplsbset(size_t size, const mpw* data)
+ /*@*/;
/*!\fn void mpsetmsb(size_t size, mpw* data)
* \brief This function sets the most significant bit of a multi-precision
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-void mpsetmsb(size_t size, mpw* data);
+void mpsetmsb(size_t size, mpw* data)
+ /*@*/;
/*!\fn void mpsetlsb(size_t size, mpw* data)
* \brief This function sets the least significant bit of a multi-precision
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-void mpsetlsb(size_t size, mpw* data);
+void mpsetlsb(size_t size, mpw* data)
+ /*@*/;
/*!\fn void mpclrmsb(size_t size, mpw* data)
* \brief This function clears the most significant bit of a multi-precision
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-void mpclrmsb(size_t size, mpw* data);
+void mpclrmsb(size_t size, mpw* data)
+ /*@*/;
/*!\fn void mpclrlsb(size_t size, mpw* data)
* \brief This function clears the least significant bit of a multi-precision
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-void mpclrlsb(size_t size, mpw* data);
+void mpclrlsb(size_t size, mpw* data)
+ /*@*/;
/*!\fn mpand(size_t size, mpw* xdata, const mpw* ydata)
* \brief This function computes the bit-wise AND of two multi-precision
* \param ydata The multi-precision integer data.
*/
BEECRYPTAPI
-void mpand(size_t size, mpw* xdata, const mpw* ydata);
+void mpand(size_t size, mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn void mpor(size_t size, mpw* xdata, const mpw* ydata)
* \brief This function computes the bit-wise OR of two multi-precision
* \param ydata The multi-precision integer data.
*/
BEECRYPTAPI
-void mpor(size_t size, mpw* xdata, const mpw* ydata);
+void mpor(size_t size, mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn void mpxor(size_t size, mpw* xdata, const mpw* ydata)
* \brief This function computes the bit-wise XOR of two multi-precision
* \param ydata The multi-precision integer data.
*/
BEECRYPTAPI
-void mpxor(size_t size, mpw* xdata, const mpw* ydata);
+void mpxor(size_t size, mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn mpnot(size_t size, mpw* data)
* \brief This function flips all bits of a multi-precision integer.
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-void mpnot(size_t size, mpw* data);
+void mpnot(size_t size, mpw* data)
+ /*@*/;
/*!\fn void mpsetw(size_t size, mpw* xdata, mpw y)
* \brief This function sets the value of a multi-precision integer to the
* \param y The multi-precision word.
*/
BEECRYPTAPI
-void mpsetw(size_t size, mpw* xdata, mpw y);
+void mpsetw(size_t size, mpw* xdata, mpw y)
+ /*@*/;
/*!\fn void mpsetx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function set the value of the first multi-precision integer
* \param ysize The size of the second multi-precision integer.
* \param ydata The second multi-precision integer.
*/
-void mpsetx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata);
+void mpsetx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn int mpaddw(size_t size, mpw* xdata, mpw y)
* \brief This function adds one word to a multi-precision integer.
* \return The carry-over value of the operation; this value is either 0 or 1.
*/
BEECRYPTAPI
-int mpaddw(size_t size, mpw* xdata, mpw y);
+int mpaddw(size_t size, mpw* xdata, mpw y)
+ /*@*/;
/*!\fn int mpadd(size_t size, mpw* xdata, const mpw* ydata)
* \brief This function adds two multi-precision integers of equal size.
* \return The carry-over value of the operation; this value is either 0 or 1.
*/
BEECRYPTAPI
-int mpadd (size_t size, mpw* xdata, const mpw* ydata);
+int mpadd (size_t size, mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mpaddx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function adds two multi-precision integers of different size.
* \return The carry-over value of the operation; this value is either 0 or 1.
*/
BEECRYPTAPI
-int mpaddx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata);
+int mpaddx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn int mpsubw(size_t size, mpw* xdata, mpw y)
* \brief This function subtracts one word to a multi-precision integer.
* \return The carry-over value of the operation; this value is either 0 or 1.
*/
BEECRYPTAPI
-int mpsubw(size_t size, mpw* xdata, mpw y);
+int mpsubw(size_t size, mpw* xdata, mpw y)
+ /*@*/;
/*!\fn int mpsub(size_t size, mpw* xdata, const mpw* ydata)
* \brief This function subtracts two multi-precision integers of equal size.
* \return The carry-over value of the operation; this value is either 0 or 1.
*/
BEECRYPTAPI
-int mpsub (size_t size, mpw* xdata, const mpw* ydata);
+int mpsub (size_t size, mpw* xdata, const mpw* ydata)
+ /*@*/;
/*!\fn int mpsubx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function subtracts two multi-precision integers of different
* \return The carry-over value of the operation; this value is either 0 or 1.
*/
BEECRYPTAPI
-int mpsubx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata);
+int mpsubx(size_t xsize, mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
BEECRYPTAPI
-int mpmultwo(size_t size, mpw* data);
+int mpmultwo(size_t size, mpw* data)
+ /*@*/;
/*!\fn void mpneg(size_t size, mpw* data)
* \brief This function negates a multi-precision integer.
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-void mpneg(size_t size, mpw* data);
+void mpneg(size_t size, mpw* data)
+ /*@*/;
/*!\fn size_t mpsize(size_t size, const mpw* data)
* \brief This function returns the true size of a multi-precision
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-size_t mpsize(size_t size, const mpw* data);
+size_t mpsize(size_t size, const mpw* data)
+ /*@*/;
/*!\fn size_t mpbits(size_t size, const mpw* data)
* \brief This function returns the number of significant bits
* \param data The multi-precision integer data.
*/
BEECRYPTAPI
-size_t mpbits(size_t size, const mpw* data);
+size_t mpbits(size_t size, const mpw* data)
+ /*@*/;
BEECRYPTAPI
-size_t mpmszcnt(size_t size, const mpw* data);
+size_t mpmszcnt(size_t size, const mpw* data)
+ /*@*/;
BEECRYPTAPI
-size_t mplszcnt(size_t size, const mpw* data);
+size_t mplszcnt(size_t size, const mpw* data)
+ /*@*/;
BEECRYPTAPI
-void mplshift(size_t size, mpw* data, size_t count);
+void mplshift(size_t size, mpw* data, size_t count)
+ /*@*/;
BEECRYPTAPI
-void mprshift(size_t size, mpw* data, size_t count);
+void mprshift(size_t size, mpw* data, size_t count)
+ /*@*/;
BEECRYPTAPI
-size_t mprshiftlsz(size_t size, mpw* data);
+size_t mprshiftlsz(size_t size, mpw* data)
+ /*@*/;
BEECRYPTAPI
-size_t mpnorm(size_t size, mpw* data);
+size_t mpnorm(size_t size, mpw* data)
+ /*@*/;
BEECRYPTAPI
-void mpdivtwo (size_t size, mpw* data);
+void mpdivtwo (size_t size, mpw* data)
+ /*@*/;
BEECRYPTAPI
-void mpsdivtwo(size_t size, mpw* data);
+void mpsdivtwo(size_t size, mpw* data)
+ /*@*/;
/*!\fn mpw mpsetmul(size_t size, mpw* result, const mpw* data, mpw y)
* \brief This function performs a multi-precision multiply-setup.
* \return The carry-over multi-precision word.
*/
BEECRYPTAPI
-mpw mpsetmul (size_t size, mpw* result, const mpw* data, mpw y);
+mpw mpsetmul (size_t size, mpw* result, const mpw* data, mpw y)
+ /*@*/;
/*!\fn mpw mpaddmul(size_t size, mpw* result, const mpw* data, mpw y)
* \brief This function performs a mult-precision multiply-accumulate.
* \retval The carry-over multi-precision word.
*/
BEECRYPTAPI
-mpw mpaddmul (size_t size, mpw* result, const mpw* data, mpw y);
+mpw mpaddmul (size_t size, mpw* result, const mpw* data, mpw y)
+ /*@*/;
/*!\fn void mpaddsqrtrc(size_t size, mpw* result, const mpw* data)
* \brief This function is used in the calculation of a multi-precision
* squaring.
*/
BEECRYPTAPI
-void mpaddsqrtrc(size_t size, mpw* result, const mpw* data);
+void mpaddsqrtrc(size_t size, mpw* result, const mpw* data)
+ /*@*/;
/*!\fn void mpmul(mpw* result, size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
* \brief This function computes a full multi-precision product.
*/
BEECRYPTAPI
-void mpmul(mpw* result, size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata);
+void mpmul(mpw* result, size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata)
+ /*@*/;
/*!\fn void mpsqr(mpw* result, size_t size, const mpw* data)
* \brief This function computes a full multi-precision square.
*/
BEECRYPTAPI
-void mpsqr(mpw* result, size_t size, const mpw* data);
+void mpsqr(mpw* result, size_t size, const mpw* data)
+ /*@*/;
BEECRYPTAPI
-void mpgcd_w(size_t size, const mpw* xdata, const mpw* ydata, mpw* result, mpw* wksp);
+void mpgcd_w(size_t size, const mpw* xdata, const mpw* ydata, mpw* result, mpw* wksp)
+ /*@*/;
BEECRYPTAPI
-int mpextgcd_w(size_t size, const mpw* xdata, const mpw* ydata, mpw* result, mpw* wksp);
+int mpextgcd_w(size_t size, const mpw* xdata, const mpw* ydata, mpw* result, mpw* wksp)
+ /*@*/;
BEECRYPTAPI
-mpw mppndiv(mpw xhi, mpw xlo, mpw y);
+mpw mppndiv(mpw xhi, mpw xlo, mpw y)
+ /*@*/;
BEECRYPTAPI
-void mpmod (mpw* result, size_t xsize, const mpw* xdata, size_t ysize, const mpw*ydata, mpw* wksp);
+void mpmod (mpw* result, size_t xsize, const mpw* xdata, size_t ysize, const mpw*ydata, mpw* wksp)
+ /*@*/;
BEECRYPTAPI
-void mpndivmod(mpw* result, size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata, mpw* wksp);
+void mpndivmod(mpw* result, size_t xsize, const mpw* xdata, size_t ysize, const mpw* ydata, mpw* wksp)
+ /*@*/;
/*
* Output Routines
*/
BEECRYPTAPI
-void mpprint(size_t size, const mpw* data);
+void mpprint(size_t size, const mpw* data)
+ /*@*/;
BEECRYPTAPI
-void mpprintln(size_t size, const mpw* data);
+void mpprintln(size_t size, const mpw* data)
+ /*@*/;
BEECRYPTAPI
-void mpfprint(FILE* f, size_t size, const mpw* data);
+void mpfprint(FILE* f, size_t size, const mpw* data)
+ /*@*/;
BEECRYPTAPI
-void mpfprintln(FILE* f, size_t size, const mpw* data);
+void mpfprintln(FILE* f, size_t size, const mpw* data)
+ /*@*/;
/*
* Conversion Routines
*/
BEECRYPTAPI
-int os2ip(mpw* idata, size_t isize, const byte* osdata, size_t ossize);
+int os2ip(mpw* idata, size_t isize, const byte* osdata, size_t ossize)
+ /*@*/;
BEECRYPTAPI
-int i2osp(byte* osdata, size_t ossize, const mpw* idata, size_t isize);
+int i2osp(byte* osdata, size_t ossize, const mpw* idata, size_t isize)
+ /*@*/;
BEECRYPTAPI
-int hs2ip(mpw* idata, size_t isize, const char* hsdata, size_t hssize);
+int hs2ip(mpw* idata, size_t isize, const char* hsdata, size_t hssize)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-void mpbzero(mpbarrett*);
+void mpbzero(mpbarrett*)
+ /*@*/;
BEECRYPTAPI
-void mpbinit(mpbarrett*, size_t);
+void mpbinit(mpbarrett*, size_t)
+ /*@*/;
BEECRYPTAPI
-void mpbfree(mpbarrett*);
+void mpbfree(mpbarrett*)
+ /*@*/;
BEECRYPTAPI
-void mpbcopy(mpbarrett*, const mpbarrett*);
+void mpbcopy(mpbarrett*, const mpbarrett*)
+ /*@*/;
BEECRYPTAPI
-void mpbwipe(mpbarrett*);
+void mpbwipe(mpbarrett*)
+ /*@*/;
BEECRYPTAPI
-void mpbset(mpbarrett*, size_t, const mpw*);
+void mpbset(mpbarrett*, size_t, const mpw*)
+ /*@*/;
BEECRYPTAPI
-int mpbsetbin(mpbarrett*, const byte*, size_t);
+int mpbsetbin(mpbarrett*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int mpbsethex(mpbarrett*, const char*);
+int mpbsethex(mpbarrett*, const char*)
+ /*@*/;
BEECRYPTAPI
-void mpbsubone(const mpbarrett*, mpw*);
+void mpbsubone(const mpbarrett*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbmu_w(mpbarrett*, mpw*);
+void mpbmu_w(mpbarrett*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbrnd_w (const mpbarrett*, randomGeneratorContext*, mpw*, mpw*);
+void mpbrnd_w (const mpbarrett*, randomGeneratorContext*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbrndodd_w(const mpbarrett*, randomGeneratorContext*, mpw*, mpw*);
+void mpbrndodd_w(const mpbarrett*, randomGeneratorContext*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbrndinv_w(const mpbarrett*, randomGeneratorContext*, mpw*, mpw*, mpw*);
+void mpbrndinv_w(const mpbarrett*, randomGeneratorContext*, mpw*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbneg_w(const mpbarrett*, const mpw*, mpw*);
+void mpbneg_w(const mpbarrett*, const mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbmod_w(const mpbarrett*, const mpw*, mpw*, mpw*);
+void mpbmod_w(const mpbarrett*, const mpw*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbaddmod_w(const mpbarrett*, size_t, const mpw*, size_t, const mpw*, mpw*, mpw*);
+void mpbaddmod_w(const mpbarrett*, size_t, const mpw*, size_t, const mpw*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbsubmod_w(const mpbarrett*, size_t, const mpw*, size_t, const mpw*, mpw*, mpw*);
+void mpbsubmod_w(const mpbarrett*, size_t, const mpw*, size_t, const mpw*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbmulmod_w(const mpbarrett*, size_t, const mpw*, size_t, const mpw*, mpw*, mpw*);
+void mpbmulmod_w(const mpbarrett*, size_t, const mpw*, size_t, const mpw*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbsqrmod_w(const mpbarrett*, size_t, const mpw*, mpw*, mpw*);
+void mpbsqrmod_w(const mpbarrett*, size_t, const mpw*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbpowmod_w(const mpbarrett*, size_t, const mpw*, size_t, const mpw*, mpw*, mpw*);
+void mpbpowmod_w(const mpbarrett*, size_t, const mpw*, size_t, const mpw*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbpowmodsld_w(const mpbarrett*, const mpw*, size_t, const mpw*, mpw*, mpw*);
+void mpbpowmodsld_w(const mpbarrett*, const mpw*, size_t, const mpw*, mpw*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbtwopowmod_w(const mpbarrett*, size_t, const mpw*, mpw*, mpw*);
+void mpbtwopowmod_w(const mpbarrett*, size_t, const mpw*, mpw*, mpw*)
+ /*@*/;
/* To be added:
* simultaneous multiple exponentiation, for use in dsa and elgamal signature verification
*/
BEECRYPTAPI
-void mpbsm2powmod(const mpbarrett*, const mpw*, const mpw*, const mpw*, const mpw*);
+void mpbsm2powmod(const mpbarrett*, const mpw*, const mpw*, const mpw*, const mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpbsm3powmod(const mpbarrett*, const mpw*, const mpw*, const mpw*, const mpw*, const mpw*, const mpw*);
+void mpbsm3powmod(const mpbarrett*, const mpw*, const mpw*, const mpw*, const mpw*, const mpw*, const mpw*)
+ /*@*/;
BEECRYPTAPI
-int mpbpprime_w(const mpbarrett*, randomGeneratorContext*, int, mpw*);
+int mpbpprime_w(const mpbarrett*, randomGeneratorContext*, int, mpw*)
+ /*@*/;
/* the next routines take mpnumbers as parameters */
BEECRYPTAPI
-void mpbnrnd(const mpbarrett*, randomGeneratorContext*, mpnumber*);
+void mpbnrnd(const mpbarrett*, randomGeneratorContext*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-void mpbnmulmod(const mpbarrett*, const mpnumber*, const mpnumber*, mpnumber*);
+void mpbnmulmod(const mpbarrett*, const mpnumber*, const mpnumber*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-void mpbnsqrmod(const mpbarrett*, const mpnumber*, mpnumber*);
+void mpbnsqrmod(const mpbarrett*, const mpnumber*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-void mpbnpowmod (const mpbarrett*, const mpnumber*, const mpnumber*, mpnumber*);
+void mpbnpowmod (const mpbarrett*, const mpnumber*, const mpnumber*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-void mpbnpowmodsld(const mpbarrett*, const mpw*, const mpnumber*, mpnumber*);
+void mpbnpowmodsld(const mpbarrett*, const mpw*, const mpnumber*, mpnumber*)
+ /*@*/;
BEECRYPTAPI
-size_t mpbbits(const mpbarrett*);
+size_t mpbbits(const mpbarrett*)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-void mpnzero(mpnumber*);
+void mpnzero(mpnumber*)
+ /*@*/;
BEECRYPTAPI
-void mpnsize(mpnumber*, size_t);
+void mpnsize(mpnumber*, size_t)
+ /*@*/;
BEECRYPTAPI
-void mpninit(mpnumber*, size_t, const mpw*);
+void mpninit(mpnumber*, size_t, const mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpnfree(mpnumber*);
+void mpnfree(mpnumber*)
+ /*@*/;
BEECRYPTAPI
-void mpncopy(mpnumber*, const mpnumber*);
+void mpncopy(mpnumber*, const mpnumber*)
+ /*@*/;
BEECRYPTAPI
-void mpnwipe(mpnumber*);
+void mpnwipe(mpnumber*)
+ /*@*/;
BEECRYPTAPI
-void mpnset (mpnumber*, size_t, const mpw*);
+void mpnset (mpnumber*, size_t, const mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpnsetw (mpnumber*, mpw);
+void mpnsetw (mpnumber*, mpw)
+ /*@*/;
BEECRYPTAPI
-int mpnsetbin(mpnumber*, const byte*, size_t);
+int mpnsetbin(mpnumber*, const byte*, size_t)
+ /*@*/;
BEECRYPTAPI
-int mpnsethex(mpnumber*, const char*);
+int mpnsethex(mpnumber*, const char*)
+ /*@*/;
BEECRYPTAPI
-int mpninv(mpnumber*, const mpnumber*, const mpnumber*);
+int mpninv(mpnumber*, const mpnumber*, const mpnumber*)
+ /*@*/;
/*!\brief Truncate the mpnumber to the specified number of (least significant) bits.
*/
BEECRYPTAPI
-size_t mpntrbits(mpnumber*, size_t);
+size_t mpntrbits(mpnumber*, size_t)
+ /*@*/;
BEECRYPTAPI
-size_t mpnbits(const mpnumber*);
+size_t mpnbits(const mpnumber*)
+ /*@*/;
#ifdef __cplusplus
}
* needs workspace of (size*2) words
*/
static void mpprndbits(mpbarrett* p, size_t bits, size_t lsbset, const mpnumber* min, const mpnumber* max, randomGeneratorContext* rc, mpw* wksp)
+ /*@*/
{
register size_t size = p->size;
register size_t msbclr = MP_WORDS_TO_BITS(size) - bits;
#endif
BEECRYPTAPI
-int mpptrials (size_t);
+int mpptrials (size_t)
+ /*@*/;
BEECRYPTAPI
-int mppmilrab_w (const mpbarrett*, randomGeneratorContext*, int, mpw*);
+int mppmilrab_w (const mpbarrett*, randomGeneratorContext*, int, mpw*)
+ /*@*/;
BEECRYPTAPI
-int mpprnd_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, mpw*);
+int mpprnd_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, mpw*)
+ /*@*/;
BEECRYPTAPI
-int mpprndr_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, const mpnumber*, const mpnumber*, mpw*);
+int mpprndr_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, const mpnumber*, const mpnumber*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpprndsafe_w (mpbarrett*, randomGeneratorContext*, size_t, int, mpw*);
+void mpprndsafe_w (mpbarrett*, randomGeneratorContext*, size_t, int, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpprndcon_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, const mpnumber*, const mpnumber*, mpnumber*, mpw*);
+void mpprndcon_w (mpbarrett*, randomGeneratorContext*, size_t, int, const mpnumber*, const mpnumber*, const mpnumber*, mpnumber*, mpw*)
+ /*@*/;
BEECRYPTAPI
-void mpprndconone_w(mpbarrett*, randomGeneratorContext*, size_t, int, const mpbarrett*, const mpnumber*, mpnumber*, int, mpw*);
+void mpprndconone_w(mpbarrett*, randomGeneratorContext*, size_t, int, const mpbarrett*, const mpnumber*, mpnumber*, int, mpw*)
+ /*@*/;
#ifdef __cplusplus
}
const randomGenerator mtprng = { "Mersenne Twister", sizeof(mtprngParam), (randomGeneratorSetup) mtprngSetup, (randomGeneratorSeed) mtprngSeed, (randomGeneratorNext) mtprngNext, (randomGeneratorCleanup) mtprngCleanup };
static void mtprngReload(mtprngParam* mp)
+ /*@*/
{
register uint32_t *p0 = mp->state;
register uint32_t *p2 = p0+2, *pM = p0+M, s0, s1;
/*
*/
BEECRYPTAPI
-int mtprngSetup (mtprngParam* mp);
+int mtprngSetup (mtprngParam* mp)
+ /*@*/;
/*
*/
BEECRYPTAPI
-int mtprngSeed (mtprngParam* mp, const byte* data, size_t size);
+int mtprngSeed (mtprngParam* mp, const byte* data, size_t size)
+ /*@*/;
/*
*/
BEECRYPTAPI
-int mtprngNext (mtprngParam* mp, byte* data, size_t size);
+int mtprngNext (mtprngParam* mp, byte* data, size_t size)
+ /*@*/;
/*
*/
BEECRYPTAPI
-int mtprngCleanup(mtprngParam* mp);
+int mtprngCleanup(mtprngParam* mp)
+ /*@*/;
#ifdef __cplusplus
}
* \param emsize
*/
BEECRYPTAPI
-int pkcs1_emsa_encode_digest(hashFunctionContext* ctxt, byte* emdata, size_t emsize);
+int pkcs1_emsa_encode_digest(hashFunctionContext* ctxt, byte* emdata, size_t emsize)
+ /*@*/;
#ifdef __cplusplus
}
#define PKCS12_ID_MAC 0x3
BEECRYPTAPI
-int pkcs12_derive_key(const hashFunction* h, byte id, const byte* pdata, size_t psize, const byte* sdata, size_t ssize, size_t iterationcount, byte* ndata, size_t nsize);
+int pkcs12_derive_key(const hashFunction* h, byte id, const byte* pdata, size_t psize, const byte* sdata, size_t ssize, size_t iterationcount, byte* ndata, size_t nsize)
+ /*@*/;
#ifdef __cplusplus
}
*/
BEECRYPTAPI
int rsapub(const mpbarrett* n, const mpnumber* e,
- const mpnumber* m, mpnumber* c);
+ const mpnumber* m, mpnumber* c)
+ /*@*/;
/*!\fn int rsapri(const mpbarrett* n, const mpnumber* d, const mpnumber* c, mpnumber* m)
* \brief This function performs a raw RSA private key operation.
*/
BEECRYPTAPI
int rsapri(const mpbarrett* n, const mpnumber* d,
- const mpnumber* c, mpnumber* m);
+ const mpnumber* c, mpnumber* m)
+ /*@*/;
/*!\fn int rsapricrt(const mpbarrett* n, const mpbarrett* p, const mpbarrett* q, const mpnumber* dp, const mpnumber* dq, const mpnumber* qi, const mpnumber* c, mpnumber* m)
*
BEECRYPTAPI
int rsapricrt(const mpbarrett* n, const mpbarrett* p, const mpbarrett* q,
const mpnumber* dp, const mpnumber* dq, const mpnumber* qi,
- const mpnumber* c, mpnumber* m);
+ const mpnumber* c, mpnumber* m)
+ /*@*/;
/*!\fn int rsavrfy(const mpbarrett* n, const mpnumber* e, const mpnumber* m, const mpnumber* c)
* \brief This function performs a raw RSA verification.
*/
BEECRYPTAPI
int rsavrfy(const mpbarrett* n, const mpnumber* e,
- const mpnumber* m, const mpnumber* c);
+ const mpnumber* m, const mpnumber* c)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-int rsakpMake(rsakp*, randomGeneratorContext*, size_t);
+int rsakpMake(rsakp*, randomGeneratorContext*, size_t)
+ /*@*/;
BEECRYPTAPI
-int rsakpInit(rsakp*);
+int rsakpInit(rsakp*)
+ /*@*/;
BEECRYPTAPI
-int rsakpFree(rsakp*);
+int rsakpFree(rsakp*)
+ /*@*/;
BEECRYPTAPI
-int rsakpCopy(rsakp*, const rsakp*);
+int rsakpCopy(rsakp*, const rsakp*)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-int rsapkInit(rsapk*);
+int rsapkInit(rsapk*)
+ /*@*/;
BEECRYPTAPI
-int rsapkFree(rsapk*);
+int rsapkFree(rsapk*)
+ /*@*/;
BEECRYPTAPI
-int rsapkCopy(rsapk*, const rsapk*);
+int rsapkCopy(rsapk*, const rsapk*)
+ /*@*/;
#ifdef __cplusplus
}
}
static void sha1Finish(sha1Param* sp)
+ /*@*/
{
register byte *ptr = ((byte *) sp->data) + sp->offset++;
* \param sp The hash function's parameter block.
*/
BEECRYPTAPI
-void sha1Process(sha1Param* sp);
+void sha1Process(sha1Param* sp)
+ /*@*/;
/*!\fn int sha1Reset(sha1Param* sp)
* \brief This function resets the parameter block so that it's ready for a
* \retval 0 on success.
*/
BEECRYPTAPI
-int sha1Reset (sha1Param* sp);
+int sha1Reset (sha1Param* sp)
+ /*@*/;
/*!\fn int sha1Update(sha1Param* sp, const byte* data, size_t size)
* \brief This function should be used to pass successive blocks of data
* \retval 0 on success.
*/
BEECRYPTAPI
-int sha1Update (sha1Param* sp, const byte* data, size_t size);
+int sha1Update (sha1Param* sp, const byte* data, size_t size)
+ /*@*/;
/*!\fn int sha1Digest(sha1Param* sp, byte* digest)
* \brief This function finishes the current hash computation and copies
* \retval 0 on success.
*/
BEECRYPTAPI
-int sha1Digest (sha1Param* sp, byte* digest);
+int sha1Digest (sha1Param* sp, byte* digest)
+ /*@*/;
#ifdef __cplusplus
}
}
static void sha256Finish(register sha256Param* sp)
+ /*@*/
{
register byte *ptr = ((byte *) sp->data) + sp->offset++;
* \param sp The hash function's parameter block.
*/
BEECRYPTAPI
-void sha256Process(sha256Param* sp);
+void sha256Process(sha256Param* sp)
+ /*@*/;
/*!\fn int sha256Reset(sha256Param* sp)
* \brief This function resets the parameter block so that it's ready for a
* \retval 0 on success.
*/
BEECRYPTAPI
-int sha256Reset (sha256Param* sp);
+int sha256Reset (sha256Param* sp)
+ /*@*/;
/*!\fn int sha256Update(sha256Param* sp, const byte* data, size_t size)
* \brief This function should be used to pass successive blocks of data
* \retval 0 on success.
*/
BEECRYPTAPI
-int sha256Update (sha256Param* sp, const byte* data, size_t size);
+int sha256Update (sha256Param* sp, const byte* data, size_t size)
+ /*@*/;
/*!\fn int sha256Digest(sha256Param* sp, byte* digest)
* \brief This function finishes the current hash computation and copies
* \retval 0 on success.
*/
BEECRYPTAPI
-int sha256Digest (sha256Param* sp, byte* digest);
+int sha256Digest (sha256Param* sp, byte* digest)
+ /*@*/;
#ifdef __cplusplus
}
#endif
BEECRYPTAPI
-javalong timestamp(void);
+javalong timestamp(void)
+ /*@*/;
#ifdef __cplusplus
}