Take the 2-minute tour ×
Cryptography Stack Exchange is a question and answer site for software developers, mathematicians and others interested in cryptography. It's 100% free, no registration required.

I am working on a project where I am benchmarking the 5 AES finalists (Rijndael, Twofish, Serpent, MARS and RC6) on CUDA Hardware.

My problem is that I am no experienced CUDA programmer. My approach is to find open source projects that implement these algorithms in CUDA and modify them to match my needs.

It was obviously no big problem to find Rijndael implementations. Twofish and Serpent were also no big problem. But I can't find anything about MARS and RC6. I already heard that with these two algorithms there might be some problems with royalty but I am not sure how serious this is.

Anyway, does anybody know if there is some source where I can find CUDA implementations of these algorithms? If there isn't something I would have to write them myself but I think these won't be good for Benchmarking.

share|improve this question
Disagree with the close vote. This question is essentially about implementations of block ciphers on new hardware, which is within the scope of this site as I understand it. –  pg1989 Oct 21 '13 at 23:40
@pg1989 actually the question is asking for references to existing cuda implementations of block ciphers, which is a pretty poor question. it could probably be made much better by focusing more on what you said. –  mikeazo Oct 22 '13 at 16:30
As a side-note: You should target ATI CPUs as well, those usually have higher performance for crypto. –  CodesInChaos Oct 23 '13 at 7:39
Good point @CodesInChaos. ATI GPUs have faster on-chip integer arithmetic than NVIDIA's, which are optimized for floating point arithmetic. –  pg1989 Oct 23 '13 at 18:42
add comment

1 Answer

up vote 4 down vote accepted

I did something similar last year with SHA-3 finalists. I can tell you from personal experience that the best course of action is to find the C/C++ reference implementations and port them to CUDA. Start naively by writing a kernel that does the entire operation in one GPU thread. Once you have it working, you can optimize for the hardware.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.