<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[wolfSSL - Embedded SSL Library — Encode big files as PKCS7]]></title>
		<link>https://www.wolfssl.com/forums/topic1182-encode-big-files-as-pkcs7.html</link>
		<atom:link href="https://www.wolfssl.com/forums/feed-rss-topic1182.xml" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Encode big files as PKCS7.]]></description>
		<lastBuildDate>Wed, 21 Feb 2018 15:35:18 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Encode big files as PKCS7]]></title>
			<link>https://www.wolfssl.com/forums/post3837.html#p3837</link>
			<description><![CDATA[<p>Hi Chris,</p><p>I&#039;m working in the firmware of a new fiscal printer (for Argentina). It is including a crypto chip (vaultic 405) and I already modified wolf to delegate some rsa functions to that chip. (see <a href="https://www.wolfssl.com/forums/topic1136-doing-privatekey-operations-with-cryptographic-chips.html)">https://www.wolfssl.com/forums/topic113 … hips.html)</a></p><p>Another requisite is to exchange some files with the authoritiy in argentina. Those files *must* be cms (pkcs7) signed but not encrypted. One of the files to send is an electronic journal of, possibly, several mb, and the hardware doesn&#039;t have so much ram.</p><p>I already fixed a bug in pkcs7 when data is extracted from cms file. (Handling the case of more than one bitstream of data - I&#039;m not sure why I&#039;m receiving files from argentina&#039;s authority in which the bitstreams are not larger than 1000 bytes and 2 or more consecutive bitstreams are pushed into ASN structure)</p><p>Coming back to my work, thanks for the points about hashing. Do you have any guide about how to stream out the asn?</p><p>Thanks for taking your time to answer my questions!<br />Federico</p>]]></description>
			<author><![CDATA[null@example.com (fvillaf)]]></author>
			<pubDate>Wed, 21 Feb 2018 15:35:18 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post3837.html#p3837</guid>
		</item>
		<item>
			<title><![CDATA[Re: Encode big files as PKCS7]]></title>
			<link>https://www.wolfssl.com/forums/post3834.html#p3834</link>
			<description><![CDATA[<p>Hi Federico,</p><p>wc_PKCS7_EncodeSignedData() cannot currently hash the input content in a loop of smaller chunks.&nbsp; That function (in ./wolfcrypt/src/pkcs7.c) is currently set up to call wc_HashUpdate() on &quot;pkcs7-&gt;content&quot; in to hash one block of size &quot;pkcs7-&gt;contentSz&quot;.</p><p>To modify this function to hash smaller chunks, you would need to implement a loop around wc_HashUpdate() that loops over smaller sizes before setting the &quot;contentDigest&quot; array offsets and calling wc_HashFinal().</p><p>Are you able to share more details about the project you are working on?</p><p>Best Regards,<br />Chris</p>]]></description>
			<author><![CDATA[null@example.com (chrisc)]]></author>
			<pubDate>Tue, 20 Feb 2018 23:12:34 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post3834.html#p3834</guid>
		</item>
		<item>
			<title><![CDATA[Encode big files as PKCS7]]></title>
			<link>https://www.wolfssl.com/forums/post3819.html#p3819</link>
			<description><![CDATA[<p>Hi,</p><p>I have a requisite to write an XML file as PKCS7 file, signed but not encripted. After a bit of research/debug, I arranged to succesfully do this task with code around &#039;wc_PKCS7_EncodeSignedData&#039;. It work pretty well and fast.</p><p>But my xml file could be very large (around 40mb). My board have an 8gb sdcard on which a filesystem is implemented, but the working ram is very limited (not more of 4mb free). So, I need to feed the data to &#039;EncodeSignedData&#039; in small chunks, and your function must flush the asn through another function, in small chunks too. </p><p>Is this case&nbsp; implemented in WolfSSL?<br />I&#039;m crossing the fingers, waiting for a positive answer. But, if no, could you give some tips to implement this kind of functionallity by myself?</p><p>Thanks!!<br />Federico</p>]]></description>
			<author><![CDATA[null@example.com (fvillaf)]]></author>
			<pubDate>Wed, 14 Feb 2018 15:32:23 +0000</pubDate>
			<guid>https://www.wolfssl.com/forums/post3819.html#p3819</guid>
		</item>
	</channel>
</rss>
