Hello and Thank you very much Dear Jeff and Dillon!

>Jeff,
>I take it your a night owl like me like myself! I just made another
>pot of coffee. :-)

This sentence is very funny,Thanks!


>Gary,
>Let us know when you get your environment for Visual Studio 2008
>configured.

Dear Dillon!
Unfortunately,I couldn't understand what you mean of this sentence!
Did you mean configuration for adding "Cryptopp" library to visual
studio 2008 as described

in "codeproject" article?


>Using the RSA algorithm for signature and verification is fine,
>encrypting with RSA and having to go through the trouble of adding an
>extra layer of security to your decryption using a padding scheme
>actually will slow down the performance. I take it this project will
>not be encrypting or decrypting but rather authenticating.

>Are you working with cards or modules? If so are they contactless or
>contact cards and what kind of reader are you using? Are these cards
>being used to login to terminals or as access cards?


Yes,I'm using a Smart Card that it's characteristics are as below:

1.It's a Contact Card,

2.It's OS(Operating System):MPCOS(I have necessary APDU Commands of
it),

3.It has one MF(Master File) with ID:3F00 - one DF(Dedicated File)
with ID:0400 and two EF

(Elemantary File):one Contains "PIN" value and with ID:0001
and the other EF, will be used for storing data(which is my default
key container that RSA

keypair should be placed in it) and it's ID is 0101,

4.I have APDU commands such(Update binary,Read binary,verfiy PIN) that
I'll implement them

using WinSCard.h(I can do it myself!)

5.My Card Reader: Cantact Card Reader(OMNIKEY with model:CardMan 3121)

6.I took a picture of my Smart Card and Card reader and sent to your
email!

Now,I describe my project:

I should implement some functions of CSP(Cryptographic Service
Provider)-There are

descriptions about CSP in the MSDN library,completely.

Some of functions that I should implement,are about Cryptography which
I just should

implement those about sign/verify and hash, using "CryptoPP" library
(which I have many

problems in implementing this section with "Cryptopp"
functions,because I'm so new to it

and have no sample code,but I can implement Communication with Card
using WinSCard.h

myself!)

Those CSP functions that I should implement using "cryptopp" library
are here:
1.CPGenKey //for generating keypair
2.CPDestroyKey //for destorying key(Their names are very clear!)
3.CPCreateHash //using SHA1 algorithm
4.CPHashData
5.CPSignHash //using RSA 1024 bit(I think with "RSASSA" in "Cryptopp")
6.CPDestroyHash
7.CPVerifySignature //using RSA 1024 bit


I should generate RSA keypair in "CPGenKey" function and then,
generated keys must be

returned to buffers(or a byte array) and then be written to the Card
(with Update binary

APDU command) and the other functions as their tasks!

So far,I have tried very much to write appropriate codes for each
function,but have many

problems,I really don't know how to use "Cryptopp" functions for my
purpose!
I've studied sample codes included in "Crypto++ user guide", but it
can't help me,well.

How should I implement "Sign&verfiy" process with "Cryptopp" fuctions?
(I need to sample codes very much,because I don't have enough time!)

I would send my project(written in Visual C++ 2008) to you soon, if
you accept to look and

correct it in "Cryptographic" sections.


Finally;

I don't access any one can help me,I really ask you to help me and
I'll be so thankful!
Good Luck.
Gary
On Feb 2, 12:34 pm, Dillon Beresford <[email protected]>
wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
>
>
>
> Jeffrey Walton wrote:
> > Hi Gary,
>
> > A SecByteBlock is a type def of SecBlock<byte> from secblock.h. I
> > do recall that a SecByteBlock is missing from the online
> > documentation, but SecBlock is present. See
> >http://cryptopp.com/docs/ref/class_sec_block.html.
>
> > Line 262 of secblock.h is of interest: iterator begin() {return
> > m_ptr;}
>
> > SecBlock also provides some operator void* (casts) to get at the
> > m_ptr member.
>
> > Jeff
>
> > On 2/2/09, Gary <[email protected]> wrote:
> >> Hello Thank you Mr. Beresford. Your advice was so helpfull!
>
> >> I changed the code based on your suggestion, 1-Include the
> >> "files.h" 2-change Hashmodule to HashTransformation as below:
>
> >> [ SNIP ]
>
> >> void DumpHash_SingleStep( CryptoPP::HashTransformation& hash,
> >> char const* szModuleName, std::string const& strData) { using
> >> namespace std; using namespace CryptoPP;
>
> >> // Cannot use std::string for buffer; // its internal storage
> >> might not be contiguous SecByteBlock
> >> sbbDigest(hash.DigestSize());
>
> >> hash.CalculateDigest( sbbDigest.Begin(), (byte const*)
> >> strData.data(), strData.size());
>
> >> [ SNIP ]
>
> >> Most of errors are removed! But still there are 6 error as below:
>
> >> ------ Build started: Project: cryptopp(hashmodule),
> >> Configuration: Debug Win32 ------ Compiling... 1.cpp
> >> d:\cryptopp(hashmodule)\1.cpp(22) : error C2039: 'Begin' : is not
> >> a member of
>
> >> 'CryptoPP::SecBlock<T>' with [ T=byte ]
>
> >> [ SNIP ]
>
> Jeff,
>
> I take it your a night owl like me like myself! I just made another
> pot of coffee. :-)
>
> Gary,
>
> Let us know when you get your environment for Visual Studio 2008
> configured.
>
> > I want to use from "Cryptopp" library in my project(implementing a
> > Smart Card CSP). I only want to use RSA algorithm to sign and
> > verify (not encrypt/ decrypt) with 1024-bit key size, and to use
> > SHA1 algorithm for hashing!
>
> Using the RSA algorithm for signature and verification is fine,
> encrypting with RSA and having to go through the trouble of adding an
> extra layer of security to your decryption using a padding scheme
> actually will slow down the performance. I take it this project will
> not be encrypting or decrypting but rather authenticating.
>
> Are you working with cards or modules? If so are they contactless or
> contact cards and what kind of reader are you using? Are these cards
> being used to login to terminals or as access cards?
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
> Comment: Using GnuPG with Mozilla -http://enigmail.mozdev.org
>
> iD8DBQFJhr4IRnxC5lZRuuERAuWvAJ4uvcvKRKrmwLsu5/840BMTg8njhACeMT3f
> Yu2q8plCv+kKPVrNKwrxpAs=
> =jzuM
> -----END PGP SIGNATURE-----
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the "Crypto++ Users" 
Google Group.
To unsubscribe, send an email to [email protected].
More information about Crypto++ and this group is available at 
http://www.cryptopp.com.
-~----------~----~----~----~------~----~------~--~---

Reply via email to