MirBSD manpage: 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)


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


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

     TIGERInit(TIGER_CTX *ctx);

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

     TIGERPad(TIGER_CTX *ctx);

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

     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);


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

     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.


     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);

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

           /* print the digest as one long sedecimal value */
           for (n = 0; n < TIGER_DIGEST_LENGTH; n++)
                   printf("%02x", result[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));


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



     The TIGER functions appeared in MirBSD #10.


     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.

MirBSD #10-current            September 4, 2020                              1

Generated on 2022-12-24 01:00:14 by $MirOS: src/scripts/roff2htm,v 1.113 2022/12/21 23:14:31 tg Exp $ — This product includes material provided by mirabilos.

These manual pages and other documentation are copyrighted by their respective writers; their sources are available at the project’s CVSweb, AnonCVS and other mirrors. The rest is Copyright © 2002–2022 MirBSD.

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

Kontakt / Impressum & Datenschutzerklärung