<feed xmlns='http://www.w3.org/2005/Atom'>
<title>u-boot-toradex.git/include/crypto, branch master</title>
<subtitle>U-Boot bootloader for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/'/>
<entry>
<title>mbedtls: access mbedtls private members in mscode and pkcs7 parser</title>
<updated>2025-02-27T18:11:02+00:00</updated>
<author>
<name>Raymond Mao</name>
<email>raymond.mao@linaro.org</email>
</author>
<published>2025-02-03T22:08:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=f13cd90762247661f9bd508303d830055e135ec0'/>
<id>f13cd90762247661f9bd508303d830055e135ec0</id>
<content type='text'>
U-Boot requires to access x509_internal.h, mbedtls_sha256_context and
mbedtls_sha1_context in the porting layer, and this requires to
enable MBEDTLS_ALLOW_PRIVATE_ACCESS.

Enable it to mscode and pkcs7_parser to fix a mbedtls internal building
error when X509 is selected.

Moreover, Move it to a separate file to avoid enabling it in multiple
places.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
U-Boot requires to access x509_internal.h, mbedtls_sha256_context and
mbedtls_sha1_context in the porting layer, and this requires to
enable MBEDTLS_ALLOW_PRIVATE_ACCESS.

Enable it to mscode and pkcs7_parser to fix a mbedtls internal building
error when X509 is selected.

Moreover, Move it to a separate file to avoid enabling it in multiple
places.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
Acked-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: Adapt mscode_parser to MbedTLS</title>
<updated>2024-10-14T23:58:49+00:00</updated>
<author>
<name>Raymond Mao</name>
<email>raymond.mao@linaro.org</email>
</author>
<published>2024-10-03T21:50:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=513a15db0dba24bc5e5dad971a2be1a4831a0037'/>
<id>513a15db0dba24bc5e5dad971a2be1a4831a0037</id>
<content type='text'>
Previous patch has introduced MbedTLS porting layer for mscode parser,
here to adjust the header and makefiles accordingly.
Adding _LEGACY Kconfig for legacy mscode implementation.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous patch has introduced MbedTLS porting layer for mscode parser,
here to adjust the header and makefiles accordingly.
Adding _LEGACY Kconfig for legacy mscode implementation.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: Adapt PKCS7 parser to MbedTLS</title>
<updated>2024-10-14T23:58:47+00:00</updated>
<author>
<name>Raymond Mao</name>
<email>raymond.mao@linaro.org</email>
</author>
<published>2024-10-03T21:50:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=c47bbf9a57c77023d45016b329419e9ca4877dc3'/>
<id>c47bbf9a57c77023d45016b329419e9ca4877dc3</id>
<content type='text'>
Previous patch has introduced MbedTLS porting layer for PKCS7 parser,
here to adjust the header and makefiles accordingly.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous patch has introduced MbedTLS porting layer for PKCS7 parser,
here to adjust the header and makefiles accordingly.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: Adapt x509_cert_parser to MbedTLS</title>
<updated>2024-10-14T23:58:46+00:00</updated>
<author>
<name>Raymond Mao</name>
<email>raymond.mao@linaro.org</email>
</author>
<published>2024-10-03T21:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=3741abfe86c677ed6ea05571bbab34cc25886848'/>
<id>3741abfe86c677ed6ea05571bbab34cc25886848</id>
<content type='text'>
Previous patch has introduced MbedTLS porting layer for x509 cert parser,
here to adjust the header and makefiles accordingly.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous patch has introduced MbedTLS porting layer for x509 cert parser,
here to adjust the header and makefiles accordingly.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib/crypto: Adapt public_key header with MbedTLS</title>
<updated>2024-10-14T23:58:44+00:00</updated>
<author>
<name>Raymond Mao</name>
<email>raymond.mao@linaro.org</email>
</author>
<published>2024-10-03T21:50:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=f7586471e79e2c263cc687147cf47cb462518e0e'/>
<id>f7586471e79e2c263cc687147cf47cb462518e0e</id>
<content type='text'>
Previous patch has introduced MbedTLS porting layer for public key,
here to adjust the header and makefiles accordingly.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previous patch has introduced MbedTLS porting layer for public key,
here to adjust the header and makefiles accordingly.

Signed-off-by: Raymond Mao &lt;raymond.mao@linaro.org&gt;
Reviewed-by: Ilias Apalodimas &lt;ilias.apalodimas@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>common: Drop linux/printk.h from common header</title>
<updated>2023-09-24T13:54:57+00:00</updated>
<author>
<name>Simon Glass</name>
<email>sjg@chromium.org</email>
</author>
<published>2023-09-15T00:21:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=1e94b46f73cedcebbff73799203f3266c5b28d90'/>
<id>1e94b46f73cedcebbff73799203f3266c5b28d90</id>
<content type='text'>
This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This old patch was marked as deferred. Bring it back to life, to continue
towards the removal of common.h

Move this out of the common header and include it only where needed.

Signed-off-by: Simon Glass &lt;sjg@chromium.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: crypto: add mscode_parser</title>
<updated>2022-07-05T12:37:16+00:00</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2022-07-05T05:48:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=b124efc09fc5f62cc2e17d956ba3c5c9168738e8'/>
<id>b124efc09fc5f62cc2e17d956ba3c5c9168738e8</id>
<content type='text'>
In MS authenticode, pkcs7 should have data in its contentInfo field.
This data is tagged with SpcIndirectData type and, for a signed PE image,
provides a image's message digest as SpcPeImageData.

This parser is used in image authentication to parse the field and
retrieve a message digest.

Imported from linux v5.19-rc, crypto/asymmetric_keys/mscode*.
Checkpatch.pl generates tones of warnings, but those are not fixed
for the sake of maintainability (importing from another source).

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In MS authenticode, pkcs7 should have data in its contentInfo field.
This data is tagged with SpcIndirectData type and, for a signed PE image,
provides a image's message digest as SpcPeImageData.

This parser is used in image authentication to parse the field and
retrieve a message digest.

Imported from linux v5.19-rc, crypto/asymmetric_keys/mscode*.
Checkpatch.pl generates tones of warnings, but those are not fixed
for the sake of maintainability (importing from another source).

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>dm: crypto: Define UCLASS API for ECDSA signature verification</title>
<updated>2021-08-16T08:49:35+00:00</updated>
<author>
<name>Alexandru Gagniuc</name>
<email>mr.nuke.me@gmail.com</email>
</author>
<published>2021-07-29T16:47:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=1d54af1392513c09927b97981356acadfa626d63'/>
<id>1d54af1392513c09927b97981356acadfa626d63</id>
<content type='text'>
Define a UCLASS API for verifying ECDSA signatures. Unlike
UCLASS_MOD_EXP, which focuses strictly on modular exponentiation,
the ECDSA class focuses on verification. This is done so that it
better aligns with mach-specific implementations, such as stm32mp.

Signed-off-by: Alexandru Gagniuc &lt;mr.nuke.me@gmail.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Define a UCLASS API for verifying ECDSA signatures. Unlike
UCLASS_MOD_EXP, which focuses strictly on modular exponentiation,
the ECDSA class focuses on verification. This is done so that it
better aligns with mach-specific implementations, such as stm32mp.

Signed-off-by: Alexandru Gagniuc &lt;mr.nuke.me@gmail.com&gt;
Reviewed-by: Patrick Delaunay &lt;patrick.delaunay@foss.st.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: crypto: export and enhance pkcs7_verify_one()</title>
<updated>2020-07-22T10:37:17+00:00</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2020-07-21T10:35:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=5ee81c6e3f9f6f851c69b1e3d2661d96671d1dd1'/>
<id>5ee81c6e3f9f6f851c69b1e3d2661d96671d1dd1</id>
<content type='text'>
The function, pkcs7_verify_one(), will be utilized to rework signature
verification logic aiming to support intermediate certificates in
"chain of trust."

To do that, its function interface is expanded, adding an extra argument
which is expected to return the last certificate in trusted chain.
Then, this last one must further be verified with signature database, db
and/or dbx.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function, pkcs7_verify_one(), will be utilized to rework signature
verification logic aiming to support intermediate certificates in
"chain of trust."

To do that, its function interface is expanded, adding an extra argument
which is expected to return the last certificate in trusted chain.
Then, this last one must further be verified with signature database, db
and/or dbx.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: crypto: add public_key_verify_signature()</title>
<updated>2020-07-22T10:33:55+00:00</updated>
<author>
<name>AKASHI Takahiro</name>
<email>takahiro.akashi@linaro.org</email>
</author>
<published>2020-07-21T10:35:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/u-boot-toradex.git/commit/?id=b2a1049b5c364961726add2796b6028b27008ca4'/>
<id>b2a1049b5c364961726add2796b6028b27008ca4</id>
<content type='text'>
This function will be called from x509_check_for_self_signed() and
pkcs7_verify_one(), which will be imported from linux in a later patch.

While it does exist in linux code and has a similar functionality of
rsa_verify(), it calls further linux-specific interfaces inside.
That could lead to more files being imported from linux.

So simply re-implement it here instead of re-using the code.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This function will be called from x509_check_for_self_signed() and
pkcs7_verify_one(), which will be imported from linux in a later patch.

While it does exist in linux code and has a similar functionality of
rsa_verify(), it calls further linux-specific interfaces inside.
That could lead to more files being imported from linux.

So simply re-implement it here instead of re-using the code.

Signed-off-by: AKASHI Takahiro &lt;takahiro.akashi@linaro.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
