Re: [boost] Crypto Proposal

Hi,
Perhaps this link will work:
http://socghop.appspot.com/gsoc/student_proposal/show/google/gsoc2010/chadse... Yep, it worked, thanks. Thanks to all who gave advice, please ask if you have any questions! It all sounds very good. Can you give an example of what porting some Botan functionality would look like? Would it be as simple as replacing the namespace Botan with boost::crypto/whatever in the source code? An example of what one of the Botan tutorial examples would look like in the new world would be nice. Honestly, I think there is no point if you can't commit to part 2. However, splitting it up into GSoC/non-GSoC is smart on your part. How do you plan to commit to part 2? Thanks and good luck :)
Here's an example of boostified code, from one of the examples on the site. It's not too different from the original code (it's just commented out); this is because I don't want it to be a chore to port from Botan to Boost.Botan. Also, it is intuitively designed and I see no reason to change it. Of course, if it needs redesigning, we can discuss that afterwards. Also, there are at least 600 files to move that total 2 mb's of source, so it'll take a while, even if it is just changing namespaces and the like. But I'll get started on part 2 if part 1 finishes early. As for committing to part 2, I have some (rough) guidelines for the work to be done afterwards. I'm also taking a lighter courseload so I can spend more time working. I don't know how else to convince you. Anyways, thank you for considering my proposal! Chad Seibert #include <boost/botan.h> #include <iostream> #include <memory> int main(int argc, char* argv[]) { if(argc != 5) { std::cout << "Usage: " << argv[0] << " <passphrase> " << "<ca cert> <ca key> <pkcs10>" << std::endl; return 1; } try { const std::string arg_passphrase = argv[1]; const std::string arg_ca_cert = argv[2]; const std::string arg_ca_key = argv[3]; const std::string arg_req_file = argv[4]; //AutoSeeded_RNG rng; boost::botan::rng::auto_seeded rng; //X509_Certificate ca_cert(arg_ca_cert); boost::botan::x509::certificate ca_cert(arg_ca_cert); //std::auto_ptr<PKCS8_PrivateKey> privkey(PKCS8::load_key(arg_ca_key, rng, arg_passphrase)); std::auto_ptr<boost::botan::pkcs8::private_key> privkey(pkcs8::load_key(arg_ca_key, rng, arg_passphrase)); //X509_CA ca(ca_cert, *privkey); boost::botan::x509::ca ca(ca_cert, *privkey); // got a request //PKCS10_Request req(arg_req_file); boost::botan::pkcs10::request req(arg_req_file); // you would insert checks here, and perhaps modify the request // (this example should be extended to show how) // now sign the request //X509_Time start_time(system_time()); //X509_Time end_time(system_time() + 365 * 60 * 60 * 24); //X509_Certificate new_cert = ca.sign_request(req, rng,start_time, end_time); boost::botan::x509::time start_time(system_time()); boost::botan::x509::time end_time(system_time() + 365*60*60*24); boost::botan::x509::certificate new_cert = ca.sign_request(req, rng, start_time, end_time); // send the new cert back to the requestor //std::cout << new_cert.PEM_encode(); std::cout << new_cert.pem_encode(); } catch(std::exception& e) { std::cout << e.what() << std::endl; return 1; } return 0; } _________________________________________________________________ The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail. http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4

On 4/11/2010 11:53 AM, Chad Seibert wrote:
Anyways, thank you for considering my proposal!
Chad, I put some comments on your proposal.. Could you please address them either here or in the GSoC system. The mentors are in a rather annoying crunch and we need students to respond to those comments. -- -- Grafik - Don't Assume Anything -- Redshift Software, Inc. - http://redshift-software.com -- rrivera/acm.org (msn) - grafik/redshift-software.com -- 102708583/icq - grafikrobot/aim,yahoo,skype,efnet,gmail

On 04/11/2010 10:53 AM, Chad Seibert wrote:
Here's an example of boostified code, from one of the examples on the site. It's not too different from the original code (it's just commented out); this is because I don't want it to be a chore to port from Botan to Boost.Botan. Also, it is intuitively designed and I see no reason to change it. Of course, if it needs redesigning, we can discuss that afterwards
...
//std::auto_ptr<PKCS8_PrivateKey> privkey(PKCS8::load_key(arg_ca_key, rng, arg_passphrase)); std::auto_ptr<boost::botan::pkcs8::private_key> privkey(pkcs8::load_key(arg_ca_key, rng, arg_passphrase));
Hi Chad, Would it make sense to have privkey() return the private key by value? Is it non-copyable? Rob

On 11/04/2010 7:25 PM, Rob Riggs wrote:
On 04/11/2010 10:53 AM, Chad Seibert wrote:
Here's an example of boostified code, from one of the examples on the site. It's not too different from the original code (it's just commented out); this is because I don't want it to be a chore to port from Botan to Boost.Botan. Also, it is intuitively designed and I see no reason to change it. Of course, if it needs redesigning, we can discuss that afterwards ... //std::auto_ptr<PKCS8_PrivateKey> privkey(PKCS8::load_key(arg_ca_key, rng, arg_passphrase)); std::auto_ptr<boost::botan::pkcs8::private_key> privkey(pkcs8::load_key(arg_ca_key, rng, arg_passphrase)); Hi Chad,
Would it make sense to have privkey() return the private key by value? Is it non-copyable?
I think the reason is because a PKCS#8 key can be RSA/DSA or whatever else. I'd like to be able to hold keys by value but I'm not sure whether that is useful. I can't really see a need to copy keys around, but then again who knows? A Boostified Botan should consider this problem as Botan requires the use of lots of yucky pointers in places because of the polymorphism. -- Sohail Somani http://uint32t.blogspot.com
participants (4)
-
Chad Seibert
-
Rene Rivera
-
Rob Riggs
-
Sohail Somani