<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic HMAC SHA1 and PBKDF2 SHA1 example in SYCL in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1466934#M28331</link>
    <description>&lt;P&gt;Is there any example on how to use HMAC SHA1 and PBKDF2 SHA1 under oneAPI in SYCL? I found just the basic HMAC description &lt;A href="https://www.intel.com/content/www/us/en/docs/ipp-crypto/developer-reference/2022-2/keyed-hash-functions.html" target="_self"&gt;here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;AI generated for me:&lt;BR /&gt;&lt;BR /&gt;Generate C++ HMAC SHA1 fucntion by using oneAPI functions: HMAC_GetSize , HMAC_Init, HMAC_Update , HMAC_GetTag , HMAC_Final.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;cstring&amp;gt;
#include &amp;lt;oneapi/tbb.h&amp;gt;
#include &amp;lt;oneapi/crypto.h&amp;gt;

int main()
{
    const char* key = "my-secret-key";
    const char* data = "data-to-hash";

    oneapi::crypto::key_256bit hmac_key;
    std::memcpy(hmac_key.data(), key, std::min(sizeof(hmac_key), strlen(key)));

    int hash_size = oneapi::crypto::HMAC_GetSize(oneapi::crypto::algorithm::sha1);
    std::vector&amp;lt;uint8_t&amp;gt; result(hash_size);

    oneapi::crypto::HMAC_Init hmac_init(oneapi::crypto::algorithm::sha1, hmac_key);
    oneapi::crypto::HMAC_Update hmac_update(hmac_init, data, strlen(data));
    oneapi::crypto::HMAC_Final hmac_final(hmac_update, result.data(), result.size());

    for (int i = 0; i &amp;lt; hash_size; ++i)
    {
        printf("%02x", result[i]);
    }
    std::cout &amp;lt;&amp;lt; std::endl;

    return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;Generate C++ PBKDF2 SHA1 function by using oneAPI libraries.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;oneapi/crypto.h&amp;gt;
#include &amp;lt;oneapi/tbb.h&amp;gt;

int main()
{
    const char* password = "my-strong-password";
    const uint8_t* salt = (uint8_t*)"my-random-salt";
    int salt_len = strlen((const char*)salt);
    int iterations = 4096;
    int key_len = 32;

    std::vector&amp;lt;uint8_t&amp;gt; key(key_len);

    oneapi::crypto::PBKDF2_HMAC_SHA1(password, strlen(password),
                                     salt, salt_len,
                                     iterations,
                                     key.data(), key_len);

    std::cout &amp;lt;&amp;lt; "Derived Key: ";
    for (int i = 0; i &amp;lt; key_len; i++) {
        printf("%02x", key[i]);
    }
    std::cout &amp;lt;&amp;lt; std::endl;

    return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 17 Mar 2023 05:58:48 GMT</pubDate>
    <dc:creator>Caster</dc:creator>
    <dc:date>2023-03-17T05:58:48Z</dc:date>
    <item>
      <title>HMAC SHA1 and PBKDF2 SHA1 example in SYCL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1466934#M28331</link>
      <description>&lt;P&gt;Is there any example on how to use HMAC SHA1 and PBKDF2 SHA1 under oneAPI in SYCL? I found just the basic HMAC description &lt;A href="https://www.intel.com/content/www/us/en/docs/ipp-crypto/developer-reference/2022-2/keyed-hash-functions.html" target="_self"&gt;here&lt;/A&gt;.&lt;BR /&gt;&lt;BR /&gt;AI generated for me:&lt;BR /&gt;&lt;BR /&gt;Generate C++ HMAC SHA1 fucntion by using oneAPI functions: HMAC_GetSize , HMAC_Init, HMAC_Update , HMAC_GetTag , HMAC_Final.&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;cstring&amp;gt;
#include &amp;lt;oneapi/tbb.h&amp;gt;
#include &amp;lt;oneapi/crypto.h&amp;gt;

int main()
{
    const char* key = "my-secret-key";
    const char* data = "data-to-hash";

    oneapi::crypto::key_256bit hmac_key;
    std::memcpy(hmac_key.data(), key, std::min(sizeof(hmac_key), strlen(key)));

    int hash_size = oneapi::crypto::HMAC_GetSize(oneapi::crypto::algorithm::sha1);
    std::vector&amp;lt;uint8_t&amp;gt; result(hash_size);

    oneapi::crypto::HMAC_Init hmac_init(oneapi::crypto::algorithm::sha1, hmac_key);
    oneapi::crypto::HMAC_Update hmac_update(hmac_init, data, strlen(data));
    oneapi::crypto::HMAC_Final hmac_final(hmac_update, result.data(), result.size());

    for (int i = 0; i &amp;lt; hash_size; ++i)
    {
        printf("%02x", result[i]);
    }
    std::cout &amp;lt;&amp;lt; std::endl;

    return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;Generate C++ PBKDF2 SHA1 function by using oneAPI libraries.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;#include &amp;lt;iostream&amp;gt;
#include &amp;lt;oneapi/crypto.h&amp;gt;
#include &amp;lt;oneapi/tbb.h&amp;gt;

int main()
{
    const char* password = "my-strong-password";
    const uint8_t* salt = (uint8_t*)"my-random-salt";
    int salt_len = strlen((const char*)salt);
    int iterations = 4096;
    int key_len = 32;

    std::vector&amp;lt;uint8_t&amp;gt; key(key_len);

    oneapi::crypto::PBKDF2_HMAC_SHA1(password, strlen(password),
                                     salt, salt_len,
                                     iterations,
                                     key.data(), key_len);

    std::cout &amp;lt;&amp;lt; "Derived Key: ";
    for (int i = 0; i &amp;lt; key_len; i++) {
        printf("%02x", key[i]);
    }
    std::cout &amp;lt;&amp;lt; std::endl;

    return 0;
}&lt;/LI-CODE&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 05:58:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1466934#M28331</guid>
      <dc:creator>Caster</dc:creator>
      <dc:date>2023-03-17T05:58:48Z</dc:date>
    </item>
    <item>
      <title>Re:HMAC SHA1 and PBKDF2 SHA1 example in SYCL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1466943#M28332</link>
      <description>&lt;P&gt;Hi Dan, could you confirm the name of the Intel® tool you are using from the Toolkit? Based on that info, we will move the query to the relevant forum.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We would like to know.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 17 Mar 2023 06:48:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1466943#M28332</guid>
      <dc:creator>ArpanB_Intel</dc:creator>
      <dc:date>2023-03-17T06:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: HMAC SHA1 and PBKDF2 SHA1 example in SYCL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1466956#M28333</link>
      <description>&lt;P&gt;Yes, I am using Intel® &lt;STRONG&gt;oneAPI Base Toolkit&lt;/STRONG&gt; installed over VisualStudio 2022 on my W10 notebook.&lt;/P&gt;</description>
      <pubDate>Fri, 17 Mar 2023 07:42:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1466956#M28333</guid>
      <dc:creator>Caster</dc:creator>
      <dc:date>2023-03-17T07:42:24Z</dc:date>
    </item>
    <item>
      <title>Re:HMAC SHA1 and PBKDF2 SHA1 example in SYCL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1467791#M28334</link>
      <description>&lt;P&gt;Dan, thank you for the information.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;We will move your thread to the relevant forum.&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 20 Mar 2023 17:58:04 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1467791#M28334</guid>
      <dc:creator>ArpanB_Intel</dc:creator>
      <dc:date>2023-03-20T17:58:04Z</dc:date>
    </item>
    <item>
      <title>Re:HMAC SHA1 and PBKDF2 SHA1 example in SYCL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1470115#M28336</link>
      <description>&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting in Intel communities.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;SYCL based IPP cryptography isn’t implemented yet and hence we cannot provide you with an example on how to use HMAC SHA1 and PBKDF2 SHA1 in SYCL.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Please let us know if we can close this at our end.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praneeth Achanta&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Mar 2023 09:03:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1470115#M28336</guid>
      <dc:creator>PraneethA_Intel</dc:creator>
      <dc:date>2023-03-27T09:03:01Z</dc:date>
    </item>
    <item>
      <title>Re: HMAC SHA1 and PBKDF2 SHA1 example in SYCL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1470164#M28337</link>
      <description>&lt;P&gt;Hi Praneeth,&lt;BR /&gt;&lt;BR /&gt;Thank you for letting me know.&lt;BR /&gt;&lt;BR /&gt;Dan&lt;/P&gt;</description>
      <pubDate>Mon, 27 Mar 2023 12:23:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1470164#M28337</guid>
      <dc:creator>Caster</dc:creator>
      <dc:date>2023-03-27T12:23:05Z</dc:date>
    </item>
    <item>
      <title>Re:HMAC SHA1 and PBKDF2 SHA1 example in SYCL</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1470203#M28338</link>
      <description>&lt;P&gt;Hi Dan,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks for accepting as a solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Thanks and Regards,&lt;/P&gt;&lt;P&gt;Praneeth Achanta&lt;/P&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 27 Mar 2023 14:07:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/HMAC-SHA1-and-PBKDF2-SHA1-example-in-SYCL/m-p/1470203#M28338</guid>
      <dc:creator>PraneethA_Intel</dc:creator>
      <dc:date>2023-03-27T14:07:33Z</dc:date>
    </item>
  </channel>
</rss>

