MirOS Manual: tiger(3), TIGERData(3), TIGEREnd(3), TIGERFile(3), TIGERFileChunk(3), TIGERFinal(3), TIGERInit(3), TIGERPad(3), TIGERTransform(3), TIGERUpdate(3)

TIGER(3)                   BSD Programmer's Manual                    TIGER(3)

NAME

     TIGERInit, TIGERUpdate, TIGERPad, TIGERFinal, TIGERTransform, TIGEREnd,
     TIGERFile, TIGERFileChunk, TIGERData - calculate the TIGER message digest

SYNOPSIS

     #include <sys/types.h>
     #include <tiger.h>

     void
     TIGERInit(TIGER_CTX *ctx);

     void
     TIGERUpdate(TIGER_CTX *ctx, const uint8_t *data, size_t noctets);

     void
     TIGERPad(TIGER_CTX *ctx);

     void
     TIGERFinal(uint8_t digest[TIGER_DIGEST_LENGTH], TIGER_CTX *ctx);

     void
     TIGERTransform(uint64_t state[3],
             const uint8_t block[TIGER_BLOCK_LENGTH]);

     char *
     TIGEREnd(TIGER_CTX *ctx, char *digest);

     char *
     TIGERFile(const char *filename, char *digest);

     char *
     TIGERFileChunk(const char *filename, char *digest, off_t offset,
             off_t length);

     char *
     TIGERData(const uint8_t *data, size_t len, char *digest);

DESCRIPTION

     The TIGER functions implement the 192-bit TIGER message digest hash algo-
     rithm.

     The TIGER functions are of a different family than the md4(3), md5(3),
     rmd160(3), sha1(3), and sha2(3) functions, as well of a different family
     from the whirlpool(3) functions and, despite not having been cryp-
     tanalysed that much, are considered pretty secure. All share a similar
     interface, though.

     The TIGERInit() function initialises a TIGER_CTX context for use with
     TIGERUpdate() and TIGERFinal(). The TIGERUpdate() function adds (con-
     denses) data of length noctets to the context. TIGERFinal() is called
     after processing and stores a message digest in the digest parameter.

     For a description of the other functions, please refer e.g. the rmd160(3)
     manual page.

EXAMPLES

     The follow code fragment will calculate the digest for the string "abc",
     which is "2aab1484e8c158f2bfb8c5ff41b57a525129131c957b5f93".

           TIGER_CTX context;
           uint8_t result[TIGER_DIGEST_LENGTH];
           const char buf[] = "abc";
           size_t n = strlen(buf);

           TIGERInit(&context);
           TIGERUpdate(&context, buf, n);
           TIGERFinal(result, &context);

           /* print the digest as one long sedecimal value */
           printf("0x");
           for (n = 0; n < TIGER_DIGEST_LENGTH; n++)
                   printf("%02x", result[n]);
           putchar('\n');

     Alternately, the helper functions could be used in the following way:

           TIGER_CTX context;
           uint8_t output[TIGER_DIGEST_STRING_LENGTH];
           const char buf[] = "abc";

           printf("0x%s\n", TIGERData(buf, strlen(buf), output));

SEE ALSO

     cksum(1), adler32(3), md4(3), md5(3), rmd160(3), sfv(3), sha1(3),
     sha2(3), suma(3), whirlpool(3)

     http://www.cs.technion.ac.il/~biham/Reports/Tiger/

HISTORY

     The TIGER functions appeared in MirOS #10.

AUTHORS

     This implementation of TIGER was written by Thorsten Glaser
     <tg@mirbsd.de> modelled after the RIPEMD-160 implementation already in
     libc and the TIGER reference implementation.

     The TIGEREnd(), TIGERFile(), TIGERFileChunk(), and TIGERData() helper
     functions are derived from code written by Poul-Henning Kamp.

MirOS BSD #10-current         November 22, 2009                              1

Generated on 2014-07-04 21:17:45 by $MirOS: src/scripts/roff2htm,v 1.79 2014/02/10 00:36:11 tg Exp $

These manual pages and other documentation are copyrighted by their respective writers; their source is available at our CVSweb, AnonCVS, and other mirrors. The rest is Copyright © 2002‒2014 The MirOS Project, Germany.
This product includes material provided by Thorsten Glaser.

This manual page’s HTML representation is supposed to be valid XHTML/1.1; if not, please send a bug report – diffs preferred.