Tell me more ×
IT Security Stack Exchange is a question and answer site for IT security professionals. It's 100% free, no registration required.

I'm trying to create a sample security token with Atmega64, And now i'm a little confused about how to program that. As it mentioned in PKCS11 Document token hardware should support about 70 function.
But my question is how should i write those function for my Atmega64 and i use AVR Studio 6 - AVRGCC C++ project.
A sample code for what i had write:

#include<...
#define<...
...
/* 
*
* here i define all those function
*
*/

char *get_input(){
 /*code*/
}

process_input(){
 /*code*/
}
int main(){
     while(1){
        get_input();
        process_input(); 
     }
}

Is there any problem with this?

share|improve this question
Whilst you're talking about implementing PKCS11, this is actually a programming question rather than a security question. As such, it's off topic here. I've flagged for a moderator to migrate your question to StackOverflow. – Polynomial Oct 10 '12 at 7:48
As a side note, I really recommend not doing this. Crypto is hard, and even though you're implementing a scheme known to be good it's still very hard to implement it correctly. Besides, an Atmega64 is rather limited in terms of maximum code footprint, and even more so in terms of processing speed. You can actually buy I2C / SPI interface PKCS-enabled crypto ICs, which would save you the hassle and potential vulnerabilities. – Polynomial Oct 10 '12 at 7:53

closed as off topic by Polynomial, Rory Alsop Oct 10 '12 at 7:59

Questions on IT Security Stack Exchange are expected to relate to IT security within the scope defined in the FAQ. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about closed questions here.