Commit 3a24c607 authored by Niels Möller's avatar Niels Möller

*** empty log message ***

Rev: ChangeLog:1.451
Rev: src/nettle/ChangeLog:1.54
Rev: src/nettle/hmac-md5.h:1.2(DEAD)
Rev: src/nettle/testsuite/.cvsignore:1.14
Rev: src/rsa.h:1.5(DEAD)
parent 22bd9234
2002-01-14 Niels Mller <nisse@cuckoo.hack.org>
* src/rsa.c (make_rsa_signer): Take advantage of rsa_public_key
and rsa_private_key being independent structs now. General cleanup
and deletion of old code.
* src/spki.c (spki_hash_sexp): Bugfix, don't hash the data once.
Bug reported by Werner Koch.
......
2002-01-14 Niels Mller <nisse@cuckoo.hack.org>
* des.c: Use static const for all tables.
(des_set_key): Use a new const * variable for the parity
procesing, for constness reasons.
* list-obj-sizes.awk: New file.
* nettle-internal.c, nettle-internal.h: New files.
* testsuite/Makefile.am (TS_PROGS): Added hmac-test. Deleted old
m4-stuff.
* testsuite/testutils.h (LDATA): Moved this macro here,...
* testsuite/rsa-test.c: ... from here.
* testsuite/hmac-test.c: New file.
* hmac.h: General cleanup. Added declarations of hmac-md5,
hmac-sha1 and hmac-sha256.
* hmac.c: Bug fixes.
* hmac-md5.c: First working version.
* Makefile.am (libnettle_a_SOURCES): Added hmac.c and hmac-md5.c.
(libnettleinclude_HEADERS): Added hmac.h.
* testsuite/rsa-test.c: Also test a 777-bit key.
* rsa.c (rsa_check_size): Changed argument to an mpz_t. Updated
callers.
(rsa_prepare_private_key): Compute the size of the key by
computing n = p * q.
* rsa-compat.c: Adapted to new private key struct.
* rsa_md5.c: Likesize.
* rsa_sha1.c: Likesize.
* rsa.c (rsa_check_size): New function, for computing and checking
the size of the modulo in octets.
(rsa_prepare_public_key): Usa rsa_check_size.
(rsa_init_private_key): Removed code handling n, e and d.
(rsa_clear_private_key): Likewise.
(rsa_compute_root): Always use CRT.
* rsa.h (struct rsa_private_key): Deleted public key and d from
the struct, as they are not needed. Added size attribute.
2002-01-12 Niels Mller <nisse@cuckoo.hack.org>
* Makefile.am: Added *-meta files.
......
/* hmac-md5.h
*
* HMAC message authentication code.
*/
/* nettle, low-level cryptographics library
*
* Copyright (C) 2001 Niels Mller
*
* The nettle library is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation; either version 2.1 of the License, or (at your
* option) any later version.
*
* The nettle library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
* License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with the nettle library; see the file COPYING.LIB. If not, write to
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
* MA 02111-1307, USA.
*/
#ifndef NETTLE_HMAC_MD5_H_INCLUDED
#define NETTLE_HMAC_MD5_H_INCLUDED
#include "hmac.h"
#include "md5.h"
struct hmac_md5_ctx HMAC_CTX(struct md5_ctx);
void
hmac_md5_set_key(struct hmac_md5_ctx *ctx,
unsigned key_length, const uint8_t *key);
void
hmac_md5_update(struct hmac_md5_ctx *ctx,
unsigned length, const uint8_t *data);
void
hmac_md5_digest(struct hmac_md5_ctx *ctx,
unsigned length, uint8_t *digest);
#endif /* NETTLE_HMAC_MD5_H_INCLUDED */
......@@ -10,6 +10,7 @@ cbc-test
des-compat-test
des-test
des3-test
hmac-test
md5-compat-test
md5-test
rsa-test
......
......@@ -10,6 +10,7 @@
/des-compat-test
/des-test
/des3-test
/hmac-test
/md5-compat-test
/md5-test
/rsa-test
......
/* rsa.h
*
* $Id$
*/
/* lsh, an implementation of the ssh protocol
*
* Copyright (C) 2000 Niels Mller
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#warning rsa.h is obsolete
#ifndef LSH_RSA_H_INCLUDED
#define LSH_RSA_H_INCLUDED
#include "bignum.h"
#include "publickey_crypto.h"
#if 0
#define GABA_DECLARE
#include "rsa.h.x"
#undef GABA_DECLARE
#endif
#if 0
/* GABA:
(class
(name rsa_algorithm)
(super signature_algorithm)
(vars
(hash object hash_algorithm)
; SPKI name for the algorithm
(name . int)
; The complete prefix for a DigestInfo, including the algorithm
; identifier for the hash function. A DigestInfo is formed by
; cetenating this prefix with the raw hash value.
(prefix_length . UINT32)
(prefix . "const UINT8 *")))
*/
struct signature_algorithm *
make_rsa_algorithm(struct hash_algorithm *hash,
int name,
UINT32 prefix_length,
const UINT8 *prefix);
#endif
extern struct rsa_algorithm rsa_md5_algorithm;
extern struct rsa_algorithm rsa_sha1_algorithm;
/* Non spki keys */
struct verifier *
parse_ssh_rsa_public(struct simple_buffer *buffer);
struct verifier *
make_ssh_rsa_verifier(UINT32 public_length,
const UINT8 *public);
struct sexp *
rsa_generate_key(mpz_t e, struct randomness *r, UINT32 bits);
#endif /* LSH_RSA_H_INCLUDED */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment