<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<id>tag:old.nabble.com,2006:forum-947</id>
	<title>Nabble - Cryptlib</title>
	<updated>2009-11-12T03:08:31Z</updated>
	<link rel="self" type="application/atom+xml" href="http://old.nabble.com/Cryptlib-f947.xml" />
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Cryptlib-f947.html" />
	<subtitle type="html">Peter Gutmann cryptlib security toolkit. cryptlib is a powerful security toolkit that allows even inexperienced crypto programmers to easily add encryption and authentication services to their software.</subtitle>
	
<entry>
	<id>tag:old.nabble.com,2006:post-26315311</id>
	<title>Re: Public Key Context</title>
	<published>2009-11-12T03:08:31Z</published>
	<updated>2009-11-12T03:08:31Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">I found a post from 2005 where someone tried something similiar. My problem is still that I can't add the private key that I added with
&lt;br&gt;&lt;br&gt;int privkeycontext = crypt.GetPrivateKey(keyset, crypt.KEYID_NAME, &amp;quot;Private Key&amp;quot;, &amp;quot;password&amp;quot;);
&lt;br&gt;crypt.SetAttribute(envelope, crypt.ENVINFO_PRIVATEKEY, privkeycontext);
&lt;br&gt;&lt;br&gt;&lt;br&gt;the post: 
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/Can%27t-decrypt-with-private-key-td405683.html#a405683&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://old.nabble.com/Can%27t-decrypt-with-private-key-td405683.html#a405683&lt;/a&gt;&lt;br&gt;&lt;br&gt;I don't really get it, the context is the public key also? I thought my self-signed certificate is the public key?
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;&lt;br&gt;Benjamin</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Public-Key-Context-tp20076023p26315311.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26301863</id>
	<title>Re: Public Key Context</title>
	<published>2009-11-11T06:10:57Z</published>
	<updated>2009-11-11T06:10:57Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">Hi Peter,
&lt;br&gt;&lt;br&gt;I keep writing so I'm glad if you could help me this time. I wrote this code to test if I can use the certificate instead of the pubkeycontext because I don't know how to get it and in the end I also have to write a CA for Fraunhofer. Following is the code where I try to set the certificate as private key. Why does that not work? I have a similar problem when I want to decrypt with setting the private key. In the following are both functions.
&lt;br&gt;&lt;br&gt;greetings from Germany.
&lt;br&gt;&lt;br&gt;Benjamin
&lt;br&gt;&lt;br&gt;&amp;nbsp;private static byte[] encrypt(String message)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp;byte[] envelopedData = new byte[100];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptContext = crypt.CreateContext(crypt.UNUSED, crypt.ALGO_RSA);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttributeString(cryptContext, crypt.CTXINFO_LABEL, &amp;quot;Private Key&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int keyset = crypt.KeysetOpen(crypt.UNUSED, crypt.KEYSET_FILE, &amp;quot;C:\\tee.p15&amp;quot;, crypt.KEYOPT_CREATE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.GenerateKey(cryptContext);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //key stuff
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptcertificate = crypt.CreateCert(crypt.UNUSED, crypt.CERTTYPE_CERTIFICATE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptcertificate, crypt.CERTINFO_SUBJECTPUBLICKEYINFO, cryptContext);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttributeString(cryptcertificate, crypt.CERTINFO_COMMONNAME, &amp;quot;Susanne&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttributeString(cryptcertificate, crypt.CERTINFO_COUNTRYNAME, &amp;quot;DE&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttributeString(cryptcertificate, crypt.CERTINFO_ORGANIZATIONNAME, &amp;quot;FHG&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttributeString(cryptcertificate, crypt.CERTINFO_ORGANISATIONALUNITNAME, &amp;quot;IAT&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptcertificate, crypt.CERTINFO_SELFSIGNED, 1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptcertificate, crypt.CERTINFO_CA, 1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.AddPrivateKey(keyset, cryptContext, &amp;quot;password&amp;quot;); &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SignCert(cryptcertificate, cryptContext);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.AddPublicKey(keyset, cryptcertificate);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_PUBLICKEY, cryptcertificate);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, envelopedData, envelopedData.Length);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.KeysetClose(keyset);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyCert(cryptcertificate);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyContext(cryptContext);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return envelopedData;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp;private static String decrypt(byte[] decmessage)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int keyset = crypt.KeysetOpen(crypt.UNUSED, crypt.KEYSET_FILE, &amp;quot;C:\\tee.p15&amp;quot;, crypt.KEYOPT_READONLY);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int privkey = crypt.GetPrivateKey(keyset, crypt.KEYID_NAME, &amp;quot;Private Key&amp;quot;, &amp;quot;password&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] messagebuffer = new Byte[decmessage.Length];
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int envelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_AUTO);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// crypt.SetAttribute(envelope, crypt.ENVINFO_KEYSET_DECRYPT, keyset );
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(envelope, decmessage);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(envelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(envelope, messagebuffer, messagebuffer.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(envelope);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return System.Text.Encoding.UTF8.GetString(messagebuffer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;BenjaminF&quot;&gt;&lt;br&gt;I also tried the cryptcontext but that does not work.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptContext = crypt.CreateContext(crypt.UNUSED, crypt.ALGO_RSA);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttributeString(cryptContext, crypt.CTXINFO_LABEL, &amp;quot;Private Key&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// crypt.GenerateKey(cryptContext);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //key stuff
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int keyset = crypt.KeysetOpen(crypt.UNUSED, crypt.KEYSET_FILE, &amp;quot;C:\\te.p15&amp;quot;, crypt.KEYOPT_CREATE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.AddPrivateKey(keyset, cryptContext, &amp;quot;password&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptcertificate, crypt.CERTINFO_SUBJECTPUBLICKEYINFO, cryptContext);
&lt;br&gt;&lt;br&gt;any suggestions? 
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;&lt;br&gt;Benjamin
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;BenjaminF wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;same thing here. how do I generate this public key context?
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Scott Neugroschl wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;OK, I'm probably a total idiot, but I'm can't figure this out.
&lt;br&gt;&lt;br&gt;In several places, the manual refers to a public-key context, but I
&lt;br&gt;can't really find how to create said context when generating a key.
&lt;br&gt;&lt;br&gt;If I'm generating a key, and want to save the public key in a certificate,
&lt;br&gt;is the public-key context merely the CRYPT_CONTEXT used to generate the key?
&lt;br&gt;&lt;br&gt;e.g.:
&lt;br&gt;&lt;br&gt;CRYPT_CONTEXT context;
&lt;br&gt;&lt;br&gt;cryptCreateContext(&amp;context, CRYPT_UNUSED, CRYPT_ALGO_RSA);
&lt;br&gt;cryptSetAttributeString(context, CRYPT_CTX_INFO_LABEL,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;MY-KEY&amp;quot;,6);
&lt;br&gt;cryptGenerateKey(context);
&lt;br&gt;&lt;br&gt;At this point, is the variable &amp;quot;context&amp;quot; the public-key context?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;Cryptlib@mbsks.franken.deAdministration via Mail: cryptlib-request@mbsks.franken.de
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Public-Key-Context-tp20076023p26301863.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263494</id>
	<title>Re: Public Key Context</title>
	<published>2009-11-09T01:39:41Z</published>
	<updated>2009-11-09T01:39:41Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">I also tried the cryptcontext but that does not work.
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptContext = crypt.CreateContext(crypt.UNUSED, crypt.ALGO_RSA);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttributeString(cryptContext, crypt.CTXINFO_LABEL, &amp;quot;Private Key&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;// crypt.GenerateKey(cryptContext);
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //key stuff
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int keyset = crypt.KeysetOpen(crypt.UNUSED, crypt.KEYSET_FILE, &amp;quot;C:\\te.p15&amp;quot;, crypt.KEYOPT_CREATE);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.AddPrivateKey(keyset, cryptContext, &amp;quot;password&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptcertificate, crypt.CERTINFO_SUBJECTPUBLICKEYINFO, cryptContext);
&lt;br&gt;&lt;br&gt;any suggestions? 
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;&lt;br&gt;Benjamin
&lt;br&gt;&lt;quote author=&quot;BenjaminF&quot;&gt;&lt;br&gt;same thing here. how do I generate this public key context?
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Scott Neugroschl wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;OK, I'm probably a total idiot, but I'm can't figure this out.
&lt;br&gt;&lt;br&gt;In several places, the manual refers to a public-key context, but I
&lt;br&gt;can't really find how to create said context when generating a key.
&lt;br&gt;&lt;br&gt;If I'm generating a key, and want to save the public key in a certificate,
&lt;br&gt;is the public-key context merely the CRYPT_CONTEXT used to generate the key?
&lt;br&gt;&lt;br&gt;e.g.:
&lt;br&gt;&lt;br&gt;CRYPT_CONTEXT context;
&lt;br&gt;&lt;br&gt;cryptCreateContext(&amp;context, CRYPT_UNUSED, CRYPT_ALGO_RSA);
&lt;br&gt;cryptSetAttributeString(context, CRYPT_CTX_INFO_LABEL,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;MY-KEY&amp;quot;,6);
&lt;br&gt;cryptGenerateKey(context);
&lt;br&gt;&lt;br&gt;At this point, is the variable &amp;quot;context&amp;quot; the public-key context?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;Cryptlib@mbsks.franken.deAdministration via Mail: cryptlib-request@mbsks.franken.de
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Public-Key-Context-tp20076023p26263494.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26263076</id>
	<title>Re: Public Key Context</title>
	<published>2009-11-09T01:02:46Z</published>
	<updated>2009-11-09T01:02:46Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">same thing here. how do I generate this public key context?
&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;Scott Neugroschl wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;OK, I'm probably a total idiot, but I'm can't figure this out.
&lt;br&gt;&lt;br&gt;In several places, the manual refers to a public-key context, but I
&lt;br&gt;can't really find how to create said context when generating a key.
&lt;br&gt;&lt;br&gt;If I'm generating a key, and want to save the public key in a certificate,
&lt;br&gt;is the public-key context merely the CRYPT_CONTEXT used to generate the key?
&lt;br&gt;&lt;br&gt;e.g.:
&lt;br&gt;&lt;br&gt;CRYPT_CONTEXT context;
&lt;br&gt;&lt;br&gt;cryptCreateContext(&amp;context, CRYPT_UNUSED, CRYPT_ALGO_RSA);
&lt;br&gt;cryptSetAttributeString(context, CRYPT_CTX_INFO_LABEL,
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;quot;MY-KEY&amp;quot;,6);
&lt;br&gt;cryptGenerateKey(context);
&lt;br&gt;&lt;br&gt;At this point, is the variable &amp;quot;context&amp;quot; the public-key context?
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;Cryptlib@mbsks.franken.deAdministration via Mail: cryptlib-request@mbsks.franken.de
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Public-Key-Context-tp20076023p26263076.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26214543</id>
	<title>Re: Simple Question about the Buffers in cryptPopData</title>
	<published>2009-11-05T05:56:06Z</published>
	<updated>2009-11-05T05:56:06Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">ok, figured it out. For those who are interested:
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static String decrypt(byte[] decmessage)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string label = &amp;quot;Private_Key&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptContext = crypt.CreateContext(crypt.UNUSED, crypt.ALGO_AES); 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] messagebuffer = new Byte[decmessage.Length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int envelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_AUTO);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; cryptContext = crypt.CreateContext(crypt.UNUSED, crypt.ALGO_AES);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(envelope, decmessage);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttributeString(cryptContext, crypt.CTXINFO_LABEL, label);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyContext(cryptContext);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(envelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(envelope, messagebuffer, messagebuffer.Length);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(ByteArrayToString(messagebuffer)); &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(envelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return System.Text.Encoding.UTF8.GetString(messagebuffer);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;BenjaminF&quot;&gt;&lt;br&gt;ok, I think I figured out now that I need two envelopes. One for encryption and one for decryption. But my decryption still doesn't work. I wrote:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string result =&amp;quot;&amp;quot;;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] mes = new byte[message.Length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mes = encrypt(message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;######### ENCRYPT: &amp;quot; + e.Message + &amp;quot; &amp;nbsp; &amp;nbsp;############&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = decrypt(mes);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;######### DECRYPT: &amp;quot; + e.Message + &amp;quot; &amp;nbsp; &amp;nbsp;############&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(result);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;test&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(e.Message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static byte[] encrypt(String message) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] sd = new Byte[message.Length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char[] env = new char[bytescopied];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, sd, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return sd;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static String decrypt(byte[] decmessage)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] x2 = new Byte[decmessage.Length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int envelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_AUTO);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //crypt.SetAttribute(envelope, crypt.ENVINFO_DATASIZE, decmessage.Length + 1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(envelope, decmessage,0,decmessage.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(envelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(envelope, x2,decmessage.Length,bytescopied);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(Convert.ToBase64String(x2));
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(enc.GetString(x2));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return enc.GetString(x2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;If I run this it always says in the Exception that it is not enough data available. How can that be? What do I do wrong? 
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;&lt;br&gt;Benjamin
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;BenjaminF wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;I forgot to mention that I develope with C#.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;BenjaminF wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hey Guys,
&lt;br&gt;&lt;br&gt;I got a real dumn question but I can't figure out how it works and the manual is not really helping at that point. I wrote a simple example to see how the system works:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, envelopedData, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(envelopedData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&lt;br&gt;The thing is that I have no clue how to initialize the &lt;i&gt;envelopedData&lt;/i&gt;. If I initialize it with 
&lt;br&gt;&amp;nbsp;byte[] envelopedData = ... then I have to set all dimensions and that stuff. Do I really have to do this? Also how can I get from there my String back? I was looking for Stringbuffers but found nothing.
&lt;br&gt;&lt;br&gt;Could you help me with this? :)
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Benjamin
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-Question-about-the-Buffers-in-cryptPopData-tp26160142p26214543.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26208651</id>
	<title>Re: Simple Question about the Buffers in cryptPopData</title>
	<published>2009-11-05T01:38:42Z</published>
	<updated>2009-11-05T01:38:42Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">ok, I think I figured out now that I need two envelopes. One for encryption and one for decryption. But my decryption still doesn't work. I wrote:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string result =&amp;quot;&amp;quot;;
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] mes = new byte[message.Length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; mes = encrypt(message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;######### ENCRYPT: &amp;quot; + e.Message + &amp;quot; &amp;nbsp; &amp;nbsp;############&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; try
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; result = decrypt(mes);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;######### DECRYPT: &amp;quot; + e.Message + &amp;quot; &amp;nbsp; &amp;nbsp;############&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(result);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; catch (Exception e)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;test&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(e.Message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static byte[] encrypt(String message) {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] sd = new Byte[message.Length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; char[] env = new char[bytescopied];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, sd, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return sd;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; private static String decrypt(byte[] decmessage)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; {
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; byte[] x2 = new Byte[decmessage.Length];
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int envelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_AUTO);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //crypt.SetAttribute(envelope, crypt.ENVINFO_DATASIZE, decmessage.Length + 1);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(envelope, decmessage,0,decmessage.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(envelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(envelope, x2,decmessage.Length,bytescopied);
&lt;br&gt;&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding();
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(Convert.ToBase64String(x2));
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(enc.GetString(x2));
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; return enc.GetString(x2);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }
&lt;br&gt;&lt;br&gt;&lt;br&gt;If I run this it always says in the Exception that it is not enough data available. How can that be? What do I do wrong? 
&lt;br&gt;&lt;br&gt;Best Regards,
&lt;br&gt;&lt;br&gt;Benjamin
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;quote author=&quot;BenjaminF&quot;&gt;&lt;br&gt;I forgot to mention that I develope with C#.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;BenjaminF wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hey Guys,
&lt;br&gt;&lt;br&gt;I got a real dumn question but I can't figure out how it works and the manual is not really helping at that point. I wrote a simple example to see how the system works:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, envelopedData, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(envelopedData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&lt;br&gt;The thing is that I have no clue how to initialize the &lt;i&gt;envelopedData&lt;/i&gt;. If I initialize it with 
&lt;br&gt;&amp;nbsp;byte[] envelopedData = ... then I have to set all dimensions and that stuff. Do I really have to do this? Also how can I get from there my String back? I was looking for Stringbuffers but found nothing.
&lt;br&gt;&lt;br&gt;Could you help me with this? :)
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Benjamin
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
&lt;/quote&gt;&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-Question-about-the-Buffers-in-cryptPopData-tp26160142p26208651.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26192457</id>
	<title>Re: Simple Question about the Buffers in cryptPopData</title>
	<published>2009-11-04T00:12:41Z</published>
	<updated>2009-11-04T00:12:41Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">I forgot to mention that I develope with C#.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;blockquote class=&quot;quote light-black dark-border-color&quot;&gt;&lt;div class=&quot;quote light-border-color&quot;&gt;
&lt;div class=&quot;quote-author&quot; style=&quot;font-weight: bold;&quot;&gt;BenjaminF wrote:&lt;/div&gt;
&lt;div class=&quot;quote-message shrinkable-quote&quot;&gt;Hey Guys,
&lt;br&gt;&lt;br&gt;I got a real dumn question but I can't figure out how it works and the manual is not really helping at that point. I wrote a simple example to see how the system works:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, envelopedData, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(envelopedData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&lt;br&gt;The thing is that I have no clue how to initialize the &lt;i&gt;envelopedData&lt;/i&gt;. If I initialize it with 
&lt;br&gt;&amp;nbsp;byte[] envelopedData = ... then I have to set all dimensions and that stuff. Do I really have to do this? Also how can I get from there my String back? I was looking for Stringbuffers but found nothing.
&lt;br&gt;&lt;br&gt;Could you help me with this? :)
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Benjamin
&lt;/div&gt;
&lt;/div&gt;&lt;/blockquote&gt;
</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-Question-about-the-Buffers-in-cryptPopData-tp26160142p26192457.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160142</id>
	<title>Simple Question about the Buffers in cryptPopData</title>
	<published>2009-11-03T06:04:10Z</published>
	<updated>2009-11-03T06:04:10Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">Hey Guys,
&lt;br&gt;&lt;br&gt;I got a real dumn question but I can't figure out how it works and the manual is not really helping at that point. I wrote a simple example to see how the system works:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, envelopedData, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(envelopedData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&lt;br&gt;The thing is that I have no clue how to initialize the &lt;i&gt;envelopedData&lt;/i&gt;. If I initialize it with 
&lt;br&gt;&amp;nbsp;byte[] envelopedData = ... then I have to set all dimensions and that stuff. Do I really have to do this? Also how can I get from there my String back? I was looking for Stringbuffers but found nothing.
&lt;br&gt;&lt;br&gt;Could you help me with this? :)
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Benjamin</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-Question-about-the-Buffers-in-cryptPopData-tp26160142p26160142.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160141</id>
	<title>Simple Question about the Buffers in cryptPopData</title>
	<published>2009-11-03T06:03:45Z</published>
	<updated>2009-11-03T06:03:45Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">Hey Guys,
&lt;br&gt;&lt;br&gt;I got a real dumn question but I can't figure out how it works and the manual is not really helping at that point. I wrote a simple example to see how the system works:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, envelopedData, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(envelopedData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&lt;br&gt;The thing is that I have no clue how to initialize the &lt;i&gt;envelopedData&lt;/i&gt;. If I initialize it with 
&lt;br&gt;&amp;nbsp;byte[] envelopedData = ... then I have to set all dimensions and that stuff. Do I really have to do this? Also how can I get from there my String back? I was looking for Stringbuffers but found nothing.
&lt;br&gt;&lt;br&gt;Could you help me with this? :)
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Benjamin</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-Question-about-the-Buffers-in-cryptPopData-tp26160141p26160141.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160140</id>
	<title>Simple Question about the Buffers in cryptPopData</title>
	<published>2009-11-03T06:02:21Z</published>
	<updated>2009-11-03T06:02:21Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">Hey Guys,
&lt;br&gt;&lt;br&gt;I got a real dumn question but I can't figure out how it works and the manual is not really helping at that point. I wrote a simple example to see how the system works:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, envelopedData, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(envelopedData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&lt;br&gt;The thing is that I have no clue how to initialize the &lt;i&gt;envelopedData&lt;/i&gt;. If I initialize it with 
&lt;br&gt;&amp;nbsp;byte[] envelopedData = ... then I have to set all dimensions and that stuff. Do I really have to do this? Also how can I get from there my String back? I was looking for Stringbuffers but found nothing.
&lt;br&gt;&lt;br&gt;Could you help me with this? :)
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Benjamin</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-Question-about-the-Buffers-in-cryptPopData-tp26160140p26160140.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26160136</id>
	<title>Simple Question about the Buffers in cryptPopData</title>
	<published>2009-11-03T05:57:50Z</published>
	<updated>2009-11-03T05:57:50Z</updated>
	<author>
		<name>BenjaminF</name>
	</author>
	<content type="html">Hey Guys,
&lt;br&gt;&lt;br&gt;I got a real dumn question but I can't figure out how it works and the manual is not really helping at that point. I wrote a simple example in C# to see how the system works:
&lt;br&gt;&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; string message = &amp;quot;hallo Welt!&amp;quot;;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int bytescopied;
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.Init();
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; int cryptEnvelope = crypt.CreateEnvelope(crypt.UNUSED, crypt.FORMAT_CRYPTLIB);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.SetAttribute(cryptEnvelope, crypt.ENVINFO_DATASIZE, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PushData(cryptEnvelope, message);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.FlushData(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; bytescopied = crypt.PopData(cryptEnvelope, envelopedData, message.Length);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; 
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.DestroyEnvelope(cryptEnvelope);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(envelopedData);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Console.WriteLine(&amp;quot;fertig&amp;quot;);
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; crypt.End();
&lt;br&gt;&lt;br&gt;The thing is that I have no clue how to initialize the &lt;i&gt;envelopedData&lt;/i&gt;. If I initialize it with 
&lt;br&gt;&amp;nbsp;byte[] envelopedData = ... then I have to set all dimensions and that stuff. Do I really have to do this? Also how can I get from there my String back? I was looking for Stringbuffers but found nothing.
&lt;br&gt;&lt;br&gt;Could you help me with this? :)
&lt;br&gt;&lt;br&gt;Thanks!
&lt;br&gt;&lt;br&gt;Benjamin</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Simple-Question-about-the-Buffers-in-cryptPopData-tp26160136p26160136.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-26008257</id>
	<title>Re: storing a certificate chain in a key store</title>
	<published>2009-10-22T03:48:43Z</published>
	<updated>2009-10-22T03:48:43Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">Abhijit Menon-Sen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26008257&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ams@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt;I have three certificates in bundle.crt and one in server.crt; both are in
&lt;br&gt;&amp;gt;text format, i.e. base64 wrapped in BEGIN CERTIFICATE/END CERTIFICATE lines.
&lt;br&gt;&amp;gt;I put all four certificates into all.crt, read the file contents, and call
&lt;br&gt;&amp;gt;cryptImportCert(). The result has a CRYPT_CERTINFO_CERTTYPE of
&lt;br&gt;&amp;gt;CRYPT_CERTFORMAT_CERTIFICATE, not CRYPT_CERTFORMAT_CERTCHAIN.
&lt;br&gt;&lt;br&gt;If you put four separate encoded certificates into a single file in base64
&lt;br&gt;format that you've got four distinct certs, not a certificate chain. &amp;nbsp;cryptlib
&lt;br&gt;reads the first cert and then imports it, giving you a
&lt;br&gt;CRYPT_CERTFORMAT_CERTIFICATE.
&lt;br&gt;&lt;br&gt;&amp;gt;Do I need to export the chain in some other format? (PKCS #7?) I tried
&lt;br&gt;&amp;gt;&amp;quot;openssl crl2pkcs7 -nocrl -certfile bundle.crt -certfile server.crt -out
&lt;br&gt;&amp;gt;all.p7&amp;quot; and using all.p7 in place of all.crt, but then cryptImportCert()
&lt;br&gt;&amp;gt;fails with CRYPT_ERROR_BADDATA.
&lt;br&gt;&lt;br&gt;You need to export it as a PKCS #7 certificate chain. &amp;nbsp;What does dumpasn1 tell
&lt;br&gt;you about the chain?
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26008257&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=26008257&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/storing-a-certificate-chain-in-a-key-store-tp25930848p26008257.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25989232</id>
	<title>Re: storing a certificate chain in a key store</title>
	<published>2009-10-21T02:25:18Z</published>
	<updated>2009-10-21T02:25:18Z</updated>
	<author>
		<name>Abhijit Menon-Sen</name>
	</author>
	<content type="html">At 2009-10-17 17:21:34 +1300, &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25989232&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;pgut001@...&lt;/a&gt; wrote:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt; With a standard cryptImportCert()
&lt;br&gt;&lt;br&gt;That's what I thought, but I must be doing something wrong.
&lt;br&gt;&lt;br&gt;I have three certificates in bundle.crt and one in server.crt; both are
&lt;br&gt;in text format, i.e. base64 wrapped in BEGIN CERTIFICATE/END CERTIFICATE
&lt;br&gt;lines. I put all four certificates into all.crt, read the file contents,
&lt;br&gt;and call cryptImportCert(). The result has a CRYPT_CERTINFO_CERTTYPE of
&lt;br&gt;CRYPT_CERTFORMAT_CERTIFICATE, not CRYPT_CERTFORMAT_CERTCHAIN.
&lt;br&gt;&lt;br&gt;(That was with the server certificate first and the others following it
&lt;br&gt;in the file. If instead I put the three bundle.crt certificates first,
&lt;br&gt;cryptAddPublicKey() fails.)
&lt;br&gt;&lt;br&gt;Do I need to export the chain in some other format? (PKCS #7?) I tried
&lt;br&gt;&amp;quot;openssl crl2pkcs7 -nocrl -certfile bundle.crt -certfile server.crt -out
&lt;br&gt;all.p7&amp;quot; and using all.p7 in place of all.crt, but then cryptImportCert()
&lt;br&gt;fails with CRYPT_ERROR_BADDATA.
&lt;br&gt;&lt;br&gt;What am I missing?
&lt;br&gt;&lt;br&gt;-- ams
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25989232&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25989232&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/storing-a-certificate-chain-in-a-key-store-tp25930848p25989232.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25935402</id>
	<title>Re: storing a certificate chain in a key store</title>
	<published>2009-10-16T21:21:34Z</published>
	<updated>2009-10-16T21:21:34Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">Abhijit Menon-Sen &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25935402&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;ams@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt;What should I be doing instead? How should I import a certificate chain?
&lt;br&gt;&lt;br&gt;With a standard cryptImportCert(). &amp;nbsp;Then when you do a cryptAddPublicKey()
&lt;br&gt;it'll add all the relevant certs in the chain to the keyset. &amp;nbsp;It doesn't make
&lt;br&gt;any difference whether you use a single cert or a whole chain, the API is the
&lt;br&gt;same.
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25935402&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25935402&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/storing-a-certificate-chain-in-a-key-store-tp25930848p25935402.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25930848</id>
	<title>storing a certificate chain in a key store</title>
	<published>2009-10-16T11:50:13Z</published>
	<updated>2009-10-16T11:50:13Z</updated>
	<author>
		<name>Abhijit Menon-Sen</name>
	</author>
	<content type="html">Hi.
&lt;br&gt;&lt;br&gt;I cryptKeysetOpen() a CRYPT_KEYSET_FILE store.
&lt;br&gt;&lt;br&gt;I cryptAddPrivateKey() a suitably-labelled RSA private key.
&lt;br&gt;&lt;br&gt;Then I cryptImportCert() from a .crt file, and cryptAddPublicKey() to
&lt;br&gt;the keyset, and all is well.
&lt;br&gt;&lt;br&gt;All of that works well. Now here's the complication: I want to store not
&lt;br&gt;only the certificate that corresponds to the private key, but the chain
&lt;br&gt;of certificates leading to it as well.
&lt;br&gt;&lt;br&gt;I have two files, foo.crt and cabundle.crt, that represent this chain.
&lt;br&gt;Running &amp;quot;openssl verify -verbose -CAfile cabundle.crt foo.crt&amp;quot; says OK,
&lt;br&gt;so I know that all the certificates I need are in those two files.
&lt;br&gt;&lt;br&gt;Google tells me that some Java programs in this situation interoperate
&lt;br&gt;with openssl by exporting the key and certificate chain into a PKCS#12
&lt;br&gt;file and importing from that. While I can export my certificates thus,
&lt;br&gt;cryptlib won't read PKCS#12 files; and the FAQ explains why not. Fine.
&lt;br&gt;&lt;br&gt;What should I be doing instead? How should I import a certificate chain?
&lt;br&gt;(The manual has examples of how to sign, verify, and export chains, but
&lt;br&gt;doesn't say how to import them that I can see.) Once I have the chain
&lt;br&gt;imported, will cryptAddPrivateKey() do the right thing when I try to
&lt;br&gt;store it?
&lt;br&gt;&lt;br&gt;Any help would be very greatly appreciated.
&lt;br&gt;&lt;br&gt;-- ams
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25930848&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25930848&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/storing-a-certificate-chain-in-a-key-store-tp25930848p25930848.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25644477</id>
	<title>Re: sign and timestamp PDF files</title>
	<published>2009-09-28T04:42:28Z</published>
	<updated>2009-09-28T04:42:28Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">GuTyKa &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25644477&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;gutyka@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt;Is there a way to achieve signing and timestamping PDF files with Cryptlib or
&lt;br&gt;&amp;gt;with the aid of Crytplib?
&lt;br&gt;&lt;br&gt;PDF signatures use standard PKCS #7/SMIME signatures, so all you need to do is
&lt;br&gt;embed a cryptlib detached signature in a PDF file. &amp;nbsp;cryptlib handles all of
&lt;br&gt;the crypto, but you'll need to write your own code to process the PDF file.
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25644477&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25644477&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sign-and-timestamp-PDF-files-tp25596752p25644477.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25596752</id>
	<title>sign and timestamp PDF files</title>
	<published>2009-09-24T07:13:17Z</published>
	<updated>2009-09-24T07:13:17Z</updated>
	<author>
		<name>GuTyKa</name>
	</author>
	<content type="html">Hi!
&lt;br&gt;&lt;br&gt;Is there a way to achieve signing and timestamping PDF files with Cryptlib or
&lt;br&gt;with the aid of Crytplib?
&lt;br&gt;&lt;br&gt;Thank you!
&lt;br&gt;&lt;br&gt;Regards,
&lt;br&gt;GuTyKa
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25596752&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25596752&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/sign-and-timestamp-PDF-files-tp25596752p25596752.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25486454</id>
	<title>Re: Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-16T23:55:28Z</published>
	<updated>2009-09-16T23:55:28Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">It's definitely a bug in dlopen() in OS X 10.6. &amp;nbsp;To work around this, at line
&lt;br&gt;41 (or thereabouts) of cryptlib.c, add:
&lt;br&gt;&lt;br&gt;#undef USE_THREADS
&lt;br&gt;&lt;br&gt;and rebuild. &amp;nbsp;This will disable the use of dlopen() from a worker thread.
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25486454&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25486454&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25486454.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25487607</id>
	<title>Re: Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-16T23:47:02Z</published>
	<updated>2009-09-16T23:47:02Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">So a preliminary update, the problem is due to a SIGTRAP in dlopen(), an
&lt;br&gt;(apparent) bug introduced in Snow Leopard. &amp;nbsp;Others have found this as well,
&lt;br&gt;see e.g. &lt;a href=&quot;http://openradar.appspot.com/7209349&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://openradar.appspot.com/7209349&lt;/a&gt;.
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25487607&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25487607&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25487607.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25475482</id>
	<title>Re: Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-16T08:39:13Z</published>
	<updated>2009-09-16T08:39:13Z</updated>
	<author>
		<name>Miller, Timothy J.</name>
	</author>
	<content type="html">Peter Gutmann wrote:
&lt;br&gt;&amp;gt;&amp;gt; stovetop:cryptlib-3.3.3 tmiller$ make testlib
&lt;br&gt;&amp;gt;&amp;gt; Undefined symbols:
&lt;br&gt;&lt;br&gt;&amp;gt; Ah, that's an easy one, to fix it just undefine USE_DNSSRV in misc/config.h.
&lt;br&gt;&lt;br&gt;Okay, now I get:
&lt;br&gt;&lt;br&gt;stovetop:cryptlib-3.3.3 tmiller$ make testlib
&lt;br&gt;stovetop:cryptlib-3.3.3 tmiller$ ./testlib
&lt;br&gt;Trace/BPT trap
&lt;br&gt;&lt;br&gt;This is with a debug build.
&lt;br&gt;&lt;br&gt;-- Tim
&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25475482&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25475482&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (4K) &lt;a href=&quot;http://old.nabble.com/attachment/25475482/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25475482.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25466595</id>
	<title>Re: Is deriving a key in a context equivalent to RFC2898 PBKDF2?</title>
	<published>2009-09-15T22:57:42Z</published>
	<updated>2009-09-15T22:57:42Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">&amp;quot;Timothy J. Miller&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466595&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tmiller@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;div class='shrinkable-quote'&gt;&lt;br&gt;&amp;gt;I.e., if I did:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;data = &amp;lt;some data encrypted under a PBKDF2 derived key&amp;gt;
&lt;br&gt;&amp;gt;ctx = cryptCreateContext(CRYPT_UNUSED, CRYPT_ALGO_3DES);
&lt;br&gt;&amp;gt;s = cryptSetAttribute(ctx, CRYPT_CTXINFO_IV, iv, sizeof(iv));
&lt;br&gt;&amp;gt;s = cryptSetAttribute(ctx, CRYPT_CTXINFO_KEYING_ITERATIONS, count);
&lt;br&gt;&amp;gt;s = cryptSetAttributeString(ctx, CRYPT_CTXINFO_KEYING_SALT, salt, sizeof(salt));
&lt;br&gt;&amp;gt;s = cryptSetAttributeString(ctx, CRYPT_CTXINFO_KEYING_VALUE, password, sizeof(password));
&lt;br&gt;&amp;gt;s = cryptDecrypt(ctx, data, sizeof(data));
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;Do I get the right plaintext? &amp;nbsp;:)
&lt;/div&gt;&lt;br&gt;Yes, provided the values you're setting are the same as what was set when the
&lt;br&gt;data was encrypted, that should give you the correct plaintext.
&lt;br&gt;&lt;br&gt;(Note that there's an easier way to do this, just use password-based
&lt;br&gt;enveloping and the only thing you need to worry about is the password/key).
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466595&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466595&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Is-deriving-a-key-in-a-context-equivalent-to-RFC2898-PBKDF2--tp25461360p25466595.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25466455</id>
	<title>Re: Couple of questions re: attributes</title>
	<published>2009-09-15T22:42:04Z</published>
	<updated>2009-09-15T22:42:04Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">&amp;quot;Timothy J. Miller&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466455&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tmiller@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt;python: device/system.c:788: setDeviceSystem: Assertion `( ( deviceInfo ) !=
&lt;br&gt;&amp;gt;((void *)0) &amp;&amp; ( void * ) ( deviceInfo ) &amp;gt; ( void * ) &amp;_etext &amp;&amp; ( sizeof(
&lt;br&gt;&amp;gt;DEVICE_INFO ) ) &amp;gt; 0 )' failed.
&lt;br&gt;&amp;gt;Aborted.
&lt;br&gt;&lt;br&gt;Ah, damn, I forgot about that, that's triggering a gcc compiler bug when you
&lt;br&gt;enable debug mode (there are checks in the code for this, and that's one of
&lt;br&gt;them being triggered).
&lt;br&gt;&lt;br&gt;&amp;gt;Methinks I'mna hafta either drop python or drop cryptlib since I don't have a
&lt;br&gt;&amp;gt;lot of work time to commit to this, either of which is a shame.
&lt;br&gt;&lt;br&gt;Well, I'd try at least the C interface, and see if anyone responds to the
&lt;br&gt;request for help with the Python script.
&lt;br&gt;&lt;br&gt;I can also prepare a slightly newer release for you that resolves the
&lt;br&gt;(identified :-) issues you've had if you like.
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466455&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466455&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Couple-of-questions-re%3A-attributes-tp25408611p25466455.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25466454</id>
	<title>Re: Couple of questions re: attributes</title>
	<published>2009-09-15T22:38:53Z</published>
	<updated>2009-09-15T22:38:53Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">&amp;quot;Timothy J. Miller&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466454&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tmiller@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt;Who's the maintainer of this binding? &amp;nbsp;Is there one? &amp;nbsp;It could use updating,
&lt;br&gt;&amp;gt;even for 2.6, and I doubt it will work under 3.0.
&lt;br&gt;&lt;br&gt;Yeah, the 2.x -&amp;gt; 3 transition was a bit of a headache... unfortunately the
&lt;br&gt;person who created the Python script has been a bit busy with other work for
&lt;br&gt;awhile, another person (I'm avoiding names so there's no finger-pointing at
&lt;br&gt;anyone) who did the Delphi/VB/etc scripts was kind enough to have a look at
&lt;br&gt;the Python one, but if there are any Python users on the list it'd be nice to
&lt;br&gt;get someone to give it a once-over to fix it up for 3.0 and resolve any other
&lt;br&gt;minor issues.
&lt;br&gt;&lt;br&gt;&amp;gt;I can try to skip the binding and call to cryptlib directly using ctypes.
&lt;br&gt;&lt;br&gt;That would be useful, or even just anything where I can see what's being
&lt;br&gt;passed to the C code so I can reproduce the problem.
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466454&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466454&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Couple-of-questions-re%3A-attributes-tp25408611p25466454.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25466321</id>
	<title>Re: Compiling on Snow Leopard</title>
	<published>2009-09-15T22:29:24Z</published>
	<updated>2009-09-15T22:29:24Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">&amp;quot;Miller, Timothy J.&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466321&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tmiller@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt;FWIW, I'm also getting ranlib complaining about no symbols. &amp;nbsp;
&lt;br&gt;&lt;br&gt;That's a problem with Apple's ranlib, you can ignore that.
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466321&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466321&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Snow-Leopard-tp25436411p25466321.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25466320</id>
	<title>Re: Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-15T22:28:29Z</published>
	<updated>2009-09-15T22:28:29Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">&amp;quot;Miller, Timothy J.&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466320&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;tmiller@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt;I can't give you access, but here's what I get:
&lt;br&gt;&amp;gt;
&lt;br&gt;&amp;gt;stovetop:cryptlib-3.3.3 tmiller$ make testlib
&lt;br&gt;&amp;gt;Undefined symbols:
&lt;br&gt;&lt;br&gt;Ah, that's an easy one, to fix it just undefine USE_DNSSRV in misc/config.h.
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466320&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25466320&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25466320.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25461360</id>
	<title>Is deriving a key in a context equivalent to RFC2898 PBKDF2?</title>
	<published>2009-09-15T13:08:38Z</published>
	<updated>2009-09-15T13:08:38Z</updated>
	<author>
		<name>Miller, Timothy J.</name>
	</author>
	<content type="html">I.e., if I did:
&lt;br&gt;&lt;br&gt;data = &amp;lt;some data encrypted under a PBKDF2 derived key&amp;gt;
&lt;br&gt;ctx = cryptCreateContext(CRYPT_UNUSED, CRYPT_ALGO_3DES);
&lt;br&gt;s = cryptSetAttribute(ctx, CRYPT_CTXINFO_IV, iv, sizeof(iv));
&lt;br&gt;s = cryptSetAttribute(ctx, CRYPT_CTXINFO_KEYING_ITERATIONS, count);
&lt;br&gt;s = cryptSetAttributeString(ctx, CRYPT_CTXINFO_KEYING_SALT, salt, 
&lt;br&gt;sizeof(salt));
&lt;br&gt;s = cryptSetAttributeString(ctx, CRYPT_CTXINFO_KEYING_VALUE, password, 
&lt;br&gt;sizeof(password));
&lt;br&gt;s = cryptDecrypt(ctx, data, sizeof(data));
&lt;br&gt;&lt;br&gt;Do I get the right plaintext? &amp;nbsp;:)
&lt;br&gt;&lt;br&gt;-- Tim
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25461360&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25461360&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (4K) &lt;a href=&quot;http://old.nabble.com/attachment/25461360/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Is-deriving-a-key-in-a-context-equivalent-to-RFC2898-PBKDF2--tp25461360p25461360.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25442103</id>
	<title>Re: Couple of questions re: attributes</title>
	<published>2009-09-14T12:03:49Z</published>
	<updated>2009-09-14T12:03:49Z</updated>
	<author>
		<name>Miller, Timothy J.</name>
	</author>
	<content type="html">Timothy J. Miller wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; When I retry with a debug build I get (-3, 'Bad argument, parameter 3') 
&lt;br&gt;&amp;gt; instead. &amp;nbsp;As near as I can tell the Python binding doesn't pass on 
&lt;br&gt;&amp;gt; anything else. &amp;nbsp;I can try to skip the binding and call to cryptlib 
&lt;br&gt;&amp;gt; directly using ctypes.
&lt;br&gt;&lt;br&gt;Amend that. &amp;nbsp;I forgot to install the dang sharedlib prior to rebuilding 
&lt;br&gt;the cryptlib_py binding.
&lt;br&gt;&lt;br&gt;Now the module load, but aborts on cryptInit():
&lt;br&gt;&lt;br&gt;&amp;nbsp;&amp;gt;&amp;gt;&amp;gt; from cryptlib_py import *
&lt;br&gt;&amp;nbsp;&amp;gt;&amp;gt;&amp;gt; cryptInit()
&lt;br&gt;python: device/system.c:788: setDeviceSystem: Assertion `( ( deviceInfo 
&lt;br&gt;) != ((void *)0) &amp;&amp; ( void * ) ( deviceInfo ) &amp;gt; ( void * ) &amp;_etext &amp;&amp; ( 
&lt;br&gt;sizeof( DEVICE_INFO ) ) &amp;gt; 0 )' failed.
&lt;br&gt;Aborted.
&lt;br&gt;&lt;br&gt;Methinks I'mna hafta either drop python or drop cryptlib since I don't 
&lt;br&gt;have a lot of work time to commit to this, either of which is a shame.
&lt;br&gt;&lt;br&gt;-- Tim
&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25442103&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25442103&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (4K) &lt;a href=&quot;http://old.nabble.com/attachment/25442103/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Couple-of-questions-re%3A-attributes-tp25408611p25442103.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25439821</id>
	<title>Re: Couple of questions re: attributes</title>
	<published>2009-09-14T09:54:09Z</published>
	<updated>2009-09-14T09:54:09Z</updated>
	<author>
		<name>Miller, Timothy J.</name>
	</author>
	<content type="html">Peter Gutmann wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; At the native API level it should be binary data, however I'm not sure whatz
&lt;br&gt;&amp;gt; Python's marshalling does when it passes the data to the native API, perhaps
&lt;br&gt;&amp;gt; someone else can answer this.
&lt;br&gt;&lt;br&gt;As near as I can tell it's using the old C embedding/extension 
&lt;br&gt;protocols. &amp;nbsp;It's a direct conversion of a Python str into a C char* 
&lt;br&gt;using the PyObject_AsCharBuffer() call.
&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://docs.python.org/c-api/objbuffer.html&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://docs.python.org/c-api/objbuffer.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;Who's the maintainer of this binding? &amp;nbsp;Is there one? &amp;nbsp;It could use 
&lt;br&gt;updating, even for 2.6, and I doubt it will work under 3.0.
&lt;br&gt;&lt;br&gt;&amp;gt;&amp;gt;&amp;gt;&amp;gt; cryptSetAttributeString(ctx, CRYPT_CTXINFO_KEYING_VALUE, 'password')
&lt;br&gt;&amp;gt;&amp;gt; Traceback (most recent call last):
&lt;br&gt;&amp;gt;&amp;gt; &amp;nbsp; File &amp;quot;&amp;lt;stdin&amp;gt;&amp;quot;, line 1, in &amp;lt;module&amp;gt;
&lt;br&gt;&amp;gt;&amp;gt; cryptlib_py.CryptException: (-16, 'Internal consistency check failed')
&lt;br&gt;&lt;br&gt;&amp;gt; Hmm, can you provide details of what gets passed to the native API to trigger
&lt;br&gt;&amp;gt; this? &amp;nbsp;Or can you build the debug version of the code, which will throw an
&lt;br&gt;&amp;gt; exception for the check indicating where it's being done?
&lt;br&gt;&lt;br&gt;When I retry with a debug build I get (-3, 'Bad argument, parameter 3') 
&lt;br&gt;instead. &amp;nbsp;As near as I can tell the Python binding doesn't pass on 
&lt;br&gt;anything else. &amp;nbsp;I can try to skip the binding and call to cryptlib 
&lt;br&gt;directly using ctypes.
&lt;br&gt;&lt;br&gt;-- Tim
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25439821&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25439821&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (4K) &lt;a href=&quot;http://old.nabble.com/attachment/25439821/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Couple-of-questions-re%3A-attributes-tp25408611p25439821.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25436411</id>
	<title>Compiling on Snow Leopard</title>
	<published>2009-09-14T06:48:59Z</published>
	<updated>2009-09-14T06:48:59Z</updated>
	<author>
		<name>Miller, Timothy J.</name>
	</author>
	<content type="html">FWIW, I'm also getting ranlib complaining about no symbols. &amp;nbsp;I added - 
&lt;br&gt;flat_namespace with no effect.
&lt;br&gt;&lt;br&gt;-- Tim
&lt;br&gt;&lt;br&gt;ranlib: file: libcl.a(ec_lib.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ecp_mont.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ecp_smpl.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ec_mult.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ec_rand.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ec_kron.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ec_sqrt.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ctx_ecdh.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ctx_ecdsa.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ctx_md2.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ctx_md4.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ctx_rc2.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ctx_rc4.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ctx_skip.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(kg_ecc.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(fortezza.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(hardware.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(hw_dummy.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(pkcs11.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(pkcs11_init.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(pkcs11_pkc.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(pkcs11_rw.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(cmp_tcp.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ldap.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(pkcs12.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(int_debug.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(java_jni.o) has no symbols
&lt;br&gt;ranlib: file: libcl.a(ssh1.o) has no symbols
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25436411&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25436411&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (3K) &lt;a href=&quot;http://old.nabble.com/attachment/25436411/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Snow-Leopard-tp25436411p25436411.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25436194</id>
	<title>Re: Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-14T06:30:01Z</published>
	<updated>2009-09-14T06:30:01Z</updated>
	<author>
		<name>Miller, Timothy J.</name>
	</author>
	<content type="html">On Sep 14, 2009, at 12:37 AM, Peter Gutmann wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; I build it on... hmm, I can't get to the machine at the moment so I &amp;nbsp;
&lt;br&gt;&amp;gt; can't
&lt;br&gt;&amp;gt; check the version but I'm pretty sure it's 10.5. &amp;nbsp;If someone can &amp;nbsp;
&lt;br&gt;&amp;gt; give me SSH
&lt;br&gt;&amp;gt; access to a 10.6 box I'll get it running on that.
&lt;br&gt;&lt;br&gt;&amp;gt; (There was an incorrect define in the last release in osconfig.h for &amp;nbsp;
&lt;br&gt;&amp;gt; B_ENDIAN,
&lt;br&gt;&amp;gt; but apart from that it should build OK, at least on non-10.6).
&lt;br&gt;&lt;br&gt;I can't give you access, but here's what I get:
&lt;br&gt;&lt;br&gt;stovetop:cryptlib-3.3.3 tmiller$ make testlib
&lt;br&gt;Undefined symbols:
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;quot;_res_9_dn_skipname&amp;quot;, referenced from:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_findHostInfo in libcl.a(dns_srv.o)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_findHostInfo in libcl.a(dns_srv.o)
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_findHostInfo in libcl.a(dns_srv.o)
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;quot;_res_9_query&amp;quot;, referenced from:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_findHostInfo in libcl.a(dns_srv.o)
&lt;br&gt;&amp;nbsp; &amp;nbsp;&amp;quot;_res_9_dn_expand&amp;quot;, referenced from:
&lt;br&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;_findHostInfo in libcl.a(dns_srv.o)
&lt;br&gt;ld: symbol(s) not found
&lt;br&gt;collect2: ld returned 1 exit status
&lt;br&gt;make: *** [testlib] Error 1
&lt;br&gt;&lt;br&gt;Adding a Darwin stanza to getlibs.sh with -lresolv didn't seem to &amp;nbsp;
&lt;br&gt;work, but I could be mistaken on how your build system hangs together.
&lt;br&gt;&lt;br&gt;-- Tim
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25436194&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25436194&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (3K) &lt;a href=&quot;http://old.nabble.com/attachment/25436194/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25436194.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25435706</id>
	<title>Re: Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-14T05:58:30Z</published>
	<updated>2009-09-14T05:58:30Z</updated>
	<author>
		<name>Miller, Timothy J.</name>
	</author>
	<content type="html">On Sep 13, 2009, at 9:45 AM, Scott F. Comstock wrote:
&lt;br&gt;&lt;br&gt;&amp;gt; Has anyone had luck compiling Cryptlib (static or dynamic) on &amp;nbsp;
&lt;br&gt;&amp;gt; Leopard or
&lt;br&gt;&amp;gt; Snow Leopard?
&lt;br&gt;&lt;br&gt;Not yet. &amp;nbsp;I toyed with this for an hour or so over the weekend, but &amp;nbsp;
&lt;br&gt;don't have a working version yet (though it's compiling now, so that's &amp;nbsp;
&lt;br&gt;progress :). So far:
&lt;br&gt;&lt;br&gt;crypt/osconfig.h has a second &amp;quot;#define B_ENDIAN&amp;quot; after the #if/#else &amp;nbsp;
&lt;br&gt;for __ppc__ which kind of moots the point of the attempted detection.
&lt;br&gt;&lt;br&gt;Also, it appears that SL needs a Darwin linking rule in getlibs.sh to &amp;nbsp;
&lt;br&gt;link to libresolv.
&lt;br&gt;&lt;br&gt;That's as far as I got before real life intervened (read: I went to &amp;nbsp;
&lt;br&gt;the art museum).
&lt;br&gt;&lt;br&gt;-- Tim
&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;br /&gt; &lt;br /&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25435706&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25435706&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;&lt;div class=&quot;small&quot;&gt;&lt;br/&gt;&lt;img src=&quot;http://old.nabble.com/images/icon_attachment.gif&quot; &gt; &lt;strong&gt;smime.p7s&lt;/strong&gt; (3K) &lt;a href=&quot;http://old.nabble.com/attachment/25435706/0/smime.p7s&quot; target=&quot;_top&quot;&gt;Download Attachment&lt;/a&gt;&lt;/div&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25435706.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25433532</id>
	<title>Re: Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-14T03:17:48Z</published>
	<updated>2009-09-14T03:17:48Z</updated>
	<author>
		<name>Axel Rau</name>
	</author>
	<content type="html">&lt;br&gt;Am 13.09.2009 um 16:45 schrieb Scott F. Comstock:
&lt;br&gt;&lt;br&gt;&amp;gt; Has anyone had luck compiling Cryptlib (static or dynamic) on &amp;nbsp;
&lt;br&gt;&amp;gt; Leopard or Snow Leopard?
&lt;br&gt;3.3.2 compiled out of the box last April on 10.5 i386 (recent version &amp;nbsp;
&lt;br&gt;of 10.5 at that time).
&lt;br&gt;Build log available on request.
&lt;br&gt;Test completed with:
&lt;br&gt;---
&lt;br&gt;All tests concluded successfully.
&lt;br&gt;___
&lt;br&gt;&lt;br&gt;Axel
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25433532&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25433532&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25433532.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25430698</id>
	<title>Re: Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-13T22:37:51Z</published>
	<updated>2009-09-13T22:37:51Z</updated>
	<author>
		<name>Peter Gutmann</name>
	</author>
	<content type="html">&amp;quot;Scott F. Comstock&amp;quot; &amp;lt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25430698&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;scott@...&lt;/a&gt;&amp;gt; writes:
&lt;br&gt;&lt;br&gt;&amp;gt;Has anyone had luck compiling Cryptlib (static or dynamic) on Leopard or Snow
&lt;br&gt;&amp;gt;Leopard?
&lt;br&gt;&lt;br&gt;I build it on... hmm, I can't get to the machine at the moment so I can't
&lt;br&gt;check the version but I'm pretty sure it's 10.5. &amp;nbsp;If someone can give me SSH
&lt;br&gt;access to a 10.6 box I'll get it running on that.
&lt;br&gt;&lt;br&gt;(There was an incorrect define in the last release in osconfig.h for B_ENDIAN,
&lt;br&gt;but apart from that it should build OK, at least on non-10.6).
&lt;br&gt;&lt;br&gt;Peter.
&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25430698&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25430698&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25430698.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25425934</id>
	<title>Fwd:  Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-13T11:39:54Z</published>
	<updated>2009-09-13T11:39:54Z</updated>
	<author>
		<name>Andy Gocke-3</name>
	</author>
	<content type="html">&lt;div class=&quot;gmail_quote&quot;&gt;&lt;br&gt;I can make it compile, however I get a trap during the tests. I can post the fixes for debugging (there&amp;#39;s at least one define that needs to be changed), but I think some more in depth work will have to be done to fix it for snow leopard. Static compilation doesn&amp;#39;t work on leopard, but dynamic does.&lt;br&gt;
&lt;font color=&quot;#888888&quot;&gt;
&lt;br&gt;
Andy Gocke&lt;/font&gt;&lt;div&gt;&lt;div&gt;&lt;/div&gt;&lt;div class=&quot;h5&quot;&gt;&lt;br&gt;
&lt;br&gt;
On Sep 13, 2009, at 9:45 AM, Scott F. Comstock wrote:&lt;br&gt;
&lt;br&gt;
&lt;blockquote class=&quot;gmail_quote&quot; style=&quot;margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex&quot;&gt;
Has anyone had luck compiling Cryptlib (static or dynamic) on Leopard or Snow Leopard?&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
-Scott&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
_______________________________________________&lt;br&gt;
Cryptlib mailing list&lt;br&gt;
&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25425934&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25425934&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;&lt;br&gt;
Archive: &lt;a href=&quot;ftp://ftp.franken.de/pub/crypt/cryptlib/archives/&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;ftp://ftp.franken.de/pub/crypt/cryptlib/archives/&lt;/a&gt;&lt;br&gt;
&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;
Posts from non-subscribed addresses are blocked to prevent spam, please&lt;br&gt;
subscribe in order to post messages.&lt;br&gt;
&lt;/blockquote&gt;
&lt;br&gt;
&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;
&lt;br /&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25425934&amp;i=2&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25425934&amp;i=3&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25425934.html" />
</entry>

<entry>
	<id>tag:old.nabble.com,2006:post-25423898</id>
	<title>Compiling on Leopard &amp; Snow Leopard</title>
	<published>2009-09-13T07:45:14Z</published>
	<updated>2009-09-13T07:45:14Z</updated>
	<author>
		<name>Scott F. Comstock</name>
	</author>
	<content type="html">Has anyone had luck compiling Cryptlib (static or dynamic) on Leopard or 
&lt;br&gt;Snow Leopard?
&lt;br&gt;&lt;br&gt;&lt;br&gt;-Scott
&lt;br&gt;&lt;br&gt;&lt;br&gt;_______________________________________________
&lt;br&gt;Cryptlib mailing list
&lt;br&gt;&lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25423898&amp;i=0&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;Cryptlib@...&lt;/a&gt; via Mail: &lt;a href=&quot;http://old.nabble.com/user/SendEmail.jtp?type=post&amp;post=25423898&amp;i=1&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;cryptlib-request@...&lt;/a&gt;
&lt;br&gt;Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
&lt;br&gt;&lt;a href=&quot;http://news.gmane.org/gmane.comp.encryption.cryptlib&quot; target=&quot;_top&quot; rel=&quot;nofollow&quot;&gt;http://news.gmane.org/gmane.comp.encryption.cryptlib&lt;/a&gt;&lt;br&gt;Posts from non-subscribed addresses are blocked to prevent spam, please
&lt;br&gt;subscribe in order to post messages.
&lt;br&gt;</content>
	<link rel="alternate" type="text/html" href="http://old.nabble.com/Compiling-on-Leopard---Snow-Leopard-tp25423898p25423898.html" />
</entry>

</feed>
