Hi! Funny, my small example with AES worked without setting any CFLAGS.
Cheers, Oleg On Thu, Feb 11, 2016 at 11:46:20AM +0000, Landsmann, Martin wrote: > Hi Mathias, > > yes I forgot to mention the CFLAG. > If you use AES I suggest to use: > CFLAGS += -DCRYPTO_AES > and not: > CFLAGS += -DCRYPTO_THREEDES > then the appropriate CIPHER_MAX_CONTEXT_SIZE for AES will be defined [1]. > > Best regards, > Martin > > [1] > https://github.com/RIOT-OS/RIOT/blob/master/sys/include/crypto/ciphers.h#L56 > ________________________________________ > Von: users [users-boun...@riot-os.org]" im Auftrag von "Tausig > Mathias [mathias.tau...@fh-campuswien.ac.at] > Gesendet: Donnerstag, 11. Februar 2016 12:34 > An: users@riot-os.org > Betreff: Re: [riot-users] Using AES encryption > > I did use the USEMODULE clause, but without the addtional CFLAGS > setting, it won't work. aes_init/cipher_init will return 0 because > CIPHER_MAX_CONTEXT_SIZE is set to 1 in sys/include/crypto/ciphers.h. > The unit test you referenced works, because it adds a "CFLAGS += > -DCRYPTO_THREEDES" (which enables aes, too, because the > CIPHER_MAX_CONTEXT_SIZE set for 3DES is larger then the one for AES) in > the Makefile.include, too. > > cheers > Mathias > > Am Donnerstag, den 11.02.2016, 10:33 +0000 schrieb Landsmann, Martin: > > Hi Mathias, > > > > You need to add: > > USEMODULE += crypto > > to your Makefile to enable the AES cypher in your implementation. > > This line includes the crypto module which includes AES. > > Just head over to the RIOT wiki to learn more about modules [1] and > > how to use them. > > > > You can also have a look into the crypto unittests [2] to get some > > hints how to use the AES implementation. > > > > Best Regards, > > Martin > > > > [1] > > https://github.com/RIOT-OS/RIOT/wiki/Introduction#including-modules > > [2] https://github.com/RIOT-OS/RIOT/tree/master/tests/unittests/tests > > -crypto > > ________________________________________ > > Von: users [users-boun...@riot-os.org]" im Auftrag von > > "Tausig Mathias [mathias.tau...@fh-campuswien.ac.at] > > Gesendet: Donnerstag, 11. Februar 2016 11:17 > > An: users@riot-os.org > > Betreff: [riot-users] Using AES encryption > > > > Hy! > > > > I am trying to write a litle RIOT-OS project which uses AES > > encryption. > > After some fiddling around, I made it work by adding a "CFLAGS += > > -DCRYPTO_AES" line to my Makefile. > > Is this the recommended way to do it? I am asking, because I could > > not > > find any reference to it in the documentations. > > > > cheers > > Mathias > > _______________________________________________ > > users mailing list > > users@riot-os.org > > https://lists.riot-os.org/mailman/listinfo/users > -- > DI Mathias Tausig,Kompetenzzentrum für IT-Security, > FH Campus Wien,Informationstechnologien und Telekommunikation. > Favoritenstrasse 226, Raum B.3.07a,1100 Wien, Austria.T: +43 1 606 68 > 77-2142, F: +43 1 606 68 77-2139.mathias.tau...@fh-campuswien.ac.at > _______________________________________________ > users mailing list > users@riot-os.org > https://lists.riot-os.org/mailman/listinfo/users -- /* Fuck. The f-word is here so you can grep for it :-) */ linux-2.4.3/include/asm-mips/mmu_context.h
signature.asc
Description: PGP signature
_______________________________________________ users mailing list users@riot-os.org https://lists.riot-os.org/mailman/listinfo/users