home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.c      Meh, in C you gotta define EVERYTHING      243,242 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 243,221 of 243,242   
   jayjwa to Chris M. Thomasson   
   Re: My experimental HMAC cipher in C99,    
   18 Feb 26 12:41:15   
   
   XPost: sci.crypt   
   From: jayjwa@atr2.ath.cx.invalid   
      
   "Chris M. Thomasson"  writes:   
      
   >> Why I do not like your code snippets:   
   >> $ gcc hmac.c -o hmac   
   >> hmac.c:29:10: fatal error: hmac_sha2.h: No such file or directory   
   >>     29 | #include "hmac_sha2.h"   
   >>        |          ^~~~~~~~~~~~~   
   >> compilation terminated.   
   >   
   > Well, it uses the following lib:   
   >   
   > https://github.com/ogay/hmac   
   It would be better if that project made a library to link against, so   
   that you didn't have to put it all on the command line.   
      
   [12:24] jayjwa@ibushi:~/hmac$ gcc -pipe -o ct_hmac_sha2_512   
   ct_hmac_sha2_512.c hmac_sha2.c sha2.c   
   [12:25] jayjwa@ibushi:~/hmac$ echo "How now brown cow?" > test.txt   
   [12:26] jayjwa@ibushi:~/hmac$ ./ct_hmac_sha2_512 test.txt test.enc -e   
      
   === DrMoron Cipher (Fixed TRNG Version) ===   
      
   Mode: ENCRYPT   
   WARNING: Using hardcoded demo key - NOT SECURE for production!   
   Input file: test.txt   
   Output file: test.enc   
      
   Generating 73 bytes of cryptographically secure random data...   
   Random prefix generated successfully   
   Crypt Round 0:   
   ________________________   
   P_I = 92 of 92   
      
      
   Crypt Round 1:   
   ________________________   
   P_I = 92 of 92   
      
      
   Encryption complete!   
   [12:26] jayjwa@ibushi:~/hmac$ ./ct_hmac_sha2_512 test.enc test.new -d   
      
   === DrMoron Cipher (Fixed TRNG Version) ===   
      
   Mode: DECRYPT   
   WARNING: Using hardcoded demo key - NOT SECURE for production!   
   Input file: test.enc   
   Output file: test.new   
      
   Crypt Round 0:   
   ________________________   
   P_I = 92 of 92   
      
      
   Crypt Round 1:   
   ________________________   
   P_I = 92 of 92   
      
      
   Decryption complete!   
   [12:27] jayjwa@ibushi:~/hmac$ cat test.new   
   How now brown cow?   
   [12:34] jayjwa@ibushi:~/hmac$ uname -a   
   SunOS ibushi 5.11 illumos-f8f3128c12 i86pc i386 i86pc   
      
   --   
   PGP Key ID: 781C A3E2 C6ED 70A6 B356  7AF5 B510 542E D460 5CAE   
          "The Internet should always be the Wild West!"   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca