<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html lang="en" style='--code-editor-font: var(--default-mono-font, "GitLab Mono"), JetBrains Mono, Menlo, DejaVu Sans Mono, Liberation Mono, Consolas, Ubuntu Mono, Courier New, andale mono, lucida console, monospace;'>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>
GitLab
</title>
<style data-premailer="ignore" type="text/css">
a { color: #1068bf; }
</style>
<style>img {
max-width: 100%; height: auto;
}
body {
font-size: .875rem;
}
body {
-webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px;
}
body {
font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji"; font-size: inherit;
}
</style>
</head>
<body style='font-size: inherit; -webkit-text-shadow: rgba(255,255,255,.01) 0 0 1px; font-family: "GitLab Sans",-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Noto Sans",Ubuntu,Cantarell,"Helvetica Neue",sans-serif,"Apple Color Emoji","Segoe UI Emoji","Segoe UI Symbol","Noto Color Emoji";'>
<div class="content">
<p class="details" style="font-style: italic; color: #626168;">
<a href="https://gitlab.rtems.org/wmthornton-dev">Wayne Thornton</a> created a merge request: <a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/687">!687</a>
</p>
<div class="branch">
Project:Branches: wmthornton-dev/rtems:libcrypt-sha3-512 to rtems/rtos/rtems:main
</div>
<div class="author">
Author: Wayne Thornton
</div>
<div class="assignee">
Assignees:
</div>
<div class="reviewer">
Reviewers:
</div>
<div class="approvers">
</div>
<div class="md gl-mt-5" style="position: relative; z-index: 1; color: #3a383f; word-wrap: break-word; margin-top: 1rem;">
<h2 dir="auto" style="margin-top: 0; margin-bottom: 10px;" align="initial">
<a href="#summary" aria-hidden="true" class="anchor" id="user-content-summary" style="margin-top: 0; margin-left: -20px; text-decoration: none; outline: none; position: absolute; width: 20px;"></a>Summary</h2>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">cpukit/libcrypt: Add SHA3-512 Keccak Implementation</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;">- This commit introduces a full implementation of the SHA3-512 (Keccak) crypt-style password hashing function to the RTEMS libcrypt module.</span>
<span id="LC2" class="line" lang="plaintext">- The new function follows the established crypt API and output format, allowing users to select SHA3-512 for password hashing via the</span>
<span id="LC3" class="line" lang="plaintext"> $SHA3$512$ salt prefix.</span>
<span id="LC4" class="line" lang="plaintext"> - SHA3-512 is based on the Keccak sponge construction, which operates by absorbing input data into a large internal state and then squeezing out</span>
<span id="LC5" class="line" lang="plaintext"> the hash output. The Keccak-f[1600] permutation is applied repeatedly to mix the state, providing strong diffusion and resistance to</span>
<span id="LC6" class="line" lang="plaintext"> cryptanalysis. Unlike the Merkle-Damgård construction used in SHA-2, Keccak’s sponge design is more flexible and robust against certain</span>
<span id="LC7" class="line" lang="plaintext"> classes of attacks, such as length extension and collision attacks.</span>
<span id="LC8" class="line" lang="plaintext"> - The implementation parses the salt and optional rounds parameter, mixes the password and salt into the Keccak state, and performs additional</span>
<span id="LC9" class="line" lang="plaintext"> rounds to increase computational cost. The final digest is encoded in a base64 variant for compatibility with Unix password files.</span>
<span id="LC10" class="line" lang="plaintext"> - SHA3-512 is a newer standard, designed to address theoretical weaknesses in SHA-2 and provide a fundamentally different cryptographic structure.</span>
<span id="LC11" class="line" lang="plaintext"> - The sponge construction is resistant to length extension attacks, which can affect Merkle-Damgård hashes like SHA-512.</span>
<span id="LC12" class="line" lang="plaintext"> - SHA3-512 has a higher security margin and is less susceptible to certain future cryptanalytic advances.</span>
<span id="LC13" class="line" lang="plaintext"> - The Keccak algorithm was selected as the winner of the NIST SHA-3 competition and has undergone extensive public review.</span>
<span id="LC14" class="line" lang="plaintext"></span>
<span id="LC15" class="line" lang="plaintext"> Note: This change does not remove or alter existing SHA-256 or SHA-512 support, but adds SHA3-512 as an additional, more robust option for</span>
<span id="LC16" class="line" lang="plaintext"> password hashing in RTEMS.</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0 0 1rem;" align="initial">cpukit/libcrypt: Added compiler flags to detect C compiler version</p>
<div class="gl-relative markdown-code-block js-markdown-code">
<pre class="code highlight js-syntax-highlight language-plaintext" v-pre="true" style='display: block; font-size: 14px; color: #3a383f; line-height: 1.6em; overflow-x: auto; border-radius: .25rem; position: relative; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; word-break: break-all; word-wrap: break-word; background-color: #fbfafd; margin: 0 0 1rem; padding: 12px; border: 1px solid #dcdcde;'><code style='font-size: inherit; color: inherit; word-wrap: normal; word-break: keep-all; border-radius: .25rem; background-color: inherit; white-space: pre; margin-top: 0; font-family: "GitLab Mono", "JetBrains Mono", "Menlo", "DejaVu Sans Mono", "Liberation Mono", "Consolas", "Ubuntu Mono", "Courier New", "andale mono", "lucida console", monospace; font-variant-ligatures: none; overflow-wrap: normal; padding: unset;'><span id="LC1" class="line" lang="plaintext" style="margin-top: 0;"> - Introduced compiler flags to detect which C standard is being used</span>
<span id="LC2" class="line" lang="plaintext"> and use the appropriate secure memory clearing function.</span>
<span id="LC3" class="line" lang="plaintext"> - Added memset_s_rtems function to crypt.h in order to restore the</span>
<span id="LC4" class="line" lang="plaintext"> memset_s function to the C11 compiler, which is currently missing</span>
<span id="LC5" class="line" lang="plaintext"> from the RTEMS tooling. This function is written in such a way that</span>
<span id="LC6" class="line" lang="plaintext"> it cannot be optimized away by the compiler, even in build environments</span>
<span id="LC7" class="line" lang="plaintext"> where agressive compiler optimizations are present that might otherwise</span>
<span id="LC8" class="line" lang="plaintext"> skip such operations.</span>
<span id="LC9" class="line" lang="plaintext"> - Removed __FBSDID as it is not used in RTEMS.</span></code></pre>
<copy-code></copy-code><insert-code-snippet></insert-code-snippet>
</div>
<p dir="auto" style="color: #3a383f; margin: 0;" align="initial">cpukit/telnetd/pty.c: Updated comments for grammar and clarity. (Previous MR contained this change, but that MR is closed)</p>
</div>
</div>
<div class="footer" style="margin-top: 10px;">
<p style="font-size: small; color: #626168;">
—
<br>
<a href="https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/687">View it on GitLab</a>.
<br>
You're receiving this email because of your account on <a target="_blank" rel="noopener noreferrer" href="https://gitlab.rtems.org">gitlab.rtems.org</a>. <a href="https://gitlab.rtems.org/-/sent_notifications/0e81729d9ce127fff994649c817771a4/unsubscribe" target="_blank" rel="noopener noreferrer">Unsubscribe</a> from this thread · <a href="https://gitlab.rtems.org/-/profile/notifications" target="_blank" rel="noopener noreferrer" class="mng-notif-link">Manage all notifications</a> · <a href="https://gitlab.rtems.org/help" target="_blank" rel="noopener noreferrer" class="help-link">Help</a>
<span style="color: transparent; font-size: 0; display: none; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0;">
Notification message regarding https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/687 at 1755894497
</span>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Merge request","url":"https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/687"}}</script>
</p>
</div>
</body>
</html>