1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

cleaned up RISC OS code and removed lots of unnecessary stuff

This commit is contained in:
Stefan Bellon 2003-12-28 14:12:16 +00:00
parent 0f346cf8c1
commit 02ae08d6ef
23 changed files with 197 additions and 156 deletions

View file

@ -1,3 +1,11 @@
2003-12-28 Stefan Bellon <sbellon@sbellon.de>
* rndriscos.c (rndriscos_gather_random) [__riscos__]: Declare
variable outside loop.
* blowfish.c, twofish.c [__riscos__]: Removal of unnecessary
#ifdef __riscos__ sections.
2003-12-17 David Shaw <dshaw@localhost.localdomain>
* dsa.h, dsa.c (dsa_verify), elgamal.h, elgamal.c (elg_verify),

View file

@ -502,10 +502,6 @@ selftest(void)
return NULL;
}
#ifdef __riscos__
/* need to switch off CSE optimisation for Norcroft C (Acorn/Pace) */
#pragma no_optimise_cse
#endif /* __riscos__ */
static int
do_bf_setkey( BLOWFISH_context *c, byte *key, unsigned keylen )
@ -590,10 +586,6 @@ do_bf_setkey( BLOWFISH_context *c, byte *key, unsigned keylen )
return 0;
}
#ifdef __riscos__
#pragma optimise_cse
#endif /* __riscos__ */
static int
bf_setkey( BLOWFISH_context *c, byte *key, unsigned keylen )
{

View file

@ -27,7 +27,6 @@
#include <swis.h>
#include "util.h"
#define CryptRandom_Byte 0x51980
static const char * const cryptrandom_path[] = {
"GnuPG:CryptRandom",
@ -47,7 +46,7 @@ rndriscos_gather_random(void (*add)(const void*, size_t, int), int requester,
size_t length, int level)
{
static int rndriscos_initialized = 0;
int n;
int n, nbytes;
byte buffer[768];
if (!rndriscos_initialized)
@ -55,7 +54,7 @@ rndriscos_gather_random(void (*add)(const void*, size_t, int), int requester,
cryptrandom_path, 1);
while (length) {
int nbytes = length < sizeof(buffer) ? length : sizeof(buffer);
nbytes = length < sizeof(buffer) ? length : sizeof(buffer);
for (n = 0; n < nbytes; ++n)
if (_swix(CryptRandom_Byte, _OUT(0), &buffer[n]))

View file

@ -561,11 +561,6 @@ burn_stack (int bytes)
/* Perform the key setup. Note that this works only with 128- and 256-bit
* keys, despite the API that looks like it might support other sizes. */
#ifdef __riscos__
/* need to switch off CSE optimisation for Norcroft C (Acorn/Pace) */
#pragma no_optimise_cse
#endif /* __riscos__ */
static int
do_twofish_setkey (TWOFISH_context *ctx, const byte *key, unsigned int keylen)
{
@ -701,10 +696,6 @@ do_twofish_setkey (TWOFISH_context *ctx, const byte *key, unsigned int keylen)
return 0;
}
#ifdef __riscos__
#pragma optimise_cse
#endif /* __riscos__ */
static int
twofish_setkey (TWOFISH_context *ctx, const byte *key, unsigned int keylen)
{
@ -775,11 +766,6 @@ twofish_setkey (TWOFISH_context *ctx, const byte *key, unsigned int keylen)
/* Encrypt one block. in and out may be the same. */
#ifdef __riscos__
/* need to switch off CSE optimisation for Norcroft C (Acorn/Pace) */
#pragma no_optimise_cse
#endif /* __riscos__ */
static void
do_twofish_encrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
{
@ -812,10 +798,6 @@ do_twofish_encrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
OUTUNPACK (3, b, 7);
}
#ifdef __riscos__
#pragma optimise_cse
#endif /* __riscos__ */
static void
twofish_encrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
{
@ -825,11 +807,6 @@ twofish_encrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
/* Decrypt one block. in and out may be the same. */
#ifdef __riscos__
/* need to switch off CSE optimisation for Norcroft C (Acorn/Pace) - bug */
#pragma no_optimise_cse
#endif /* __riscos__ */
static void
do_twofish_decrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
{
@ -862,10 +839,6 @@ do_twofish_decrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
OUTUNPACK (3, d, 3);
}
#ifdef __riscos__
#pragma optimise_cse
#endif /* __riscos__ */
static void
twofish_decrypt (const TWOFISH_context *ctx, byte *out, const byte *in)
{