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,224 of 243,242    |
|    Chris M. Thomasson to jayjwa    |
|    Re: My experimental HMAC cipher in C99,     |
|    19 Feb 26 12:54:33    |
   
   XPost: sci.crypt   
   From: chris.m.thomasson.1@gmail.com   
      
   On 2/18/2026 9:41 AM, jayjwa wrote:   
   > "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.   
      
   It would be more convenient for sure. Also, I don't want to put ogay's   
   hmac files in my repository. A makefile would also help.   
      
      
   > [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   
   >   
      
   Excellent! Thanks for giving it a go. My next version will allow one to   
   create a secret key file and use it.   
      
   --- 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