Dataset Open Access

From A to Z: Projective coordinates leakage in the wild: research data and tooling

Aldaya, Alejandro Cabrera; Pereida Garcia, Cesar; Brumley, Billy Bob


JSON-LD (schema.org) Export

{
  "description": "<p>Description</p>\n\n<p>This dataset and software tool are for reproducing the research results related to CVE-2020-10932 and CVE-2020-11735, resulting from the article &quot;From A to Z: Projective coordinates leakage in the wild&quot; (to appear at CHES 2020). The data was used to carry out the attack in Section 6 of the article.</p>\n\n<p>Data format</p>\n\n<p>txt files</p>\n\n<p>The <code>[int].txt</code> files contain an encoded page-fault trace prefixed by <code>trace:</code>.</p>\n\n<p>A trace represents the sequence of tracked memory pages that were executed during the generation of an ECDSA signature. The trace is encoded using ASCII characters for better visualization.</p>\n\n<p>The encoding follows this table:</p>\n\n<pre><code class=\"language-markdown\">| Functions              | Symbol | Page offset |\n| ---------------------- |:------:|:-------:|\n| _gcry_ecc_ecdsa_sign   |    T   | 0xa1000 |\n| _gcry_mpi_invm         |    .   | 0xcf000 |\n| _gcry_mpi_set          |    S   | 0xd5000 |\n| _gcry_mpi_add          |    A   | 0xcd000 |\n| _gcry_mpih_sub_n       |    -   | 0xd8000 |\n| _gcry_mpih_rshift      |    -   | 0xd8000 |</code></pre>\n\n<p><code>_gcry_ecc_ecdsa_sign</code> is the highest level function tracked in the attack. This allows to differentiate different calls to the <code>_gcry_mpi_invm</code> function which contains an insecure version of a Binary Extended Euclidean Algorithm (BEEA).</p>\n\n<p>Using these pages it is possible to locate the execution of <code>_gcry_mpi_invm</code> corresponding to the computation of <code>Z mod p</code> during projective to affine coordinates conversion (see <code>preprocess_trace</code> function).</p>\n\n<p>It can be seen, that <code>_gcry_mpih_sub_n</code> and <code>_gcry_mpih_rshift</code> shares a page. However, they can be differentiated using mainly the caller memory page. This sharing, instead of being a drawback, allows a straightforward recovery of BEEA execution flow (see <code>extract_Zi</code> and <code>extract_Xi</code> functions in <code>recover_z.py</code>).</p>\n\n<p>dat files</p>\n\n<p>The format of the <code>[int].dat</code> files is as follows.</p>\n\n<ul>\n\t<li><code># X [hex]</code>: Ground truth projective output of scalar multiplication, before affine conversion</li>\n\t<li><code># Y [hex]</code>: Ground truth projective output of scalar multiplication, before affine conversion</li>\n\t<li><code># Z [hex]</code>: Ground truth projective output of scalar multiplication, before affine conversion</li>\n\t<li><code># curve_name [str]</code>: The curve (P256)</li>\n\t<li><code># h [hex]</code>: Hash of the message to be signed</li>\n\t<li><code># k [hex]</code>: Ground truth ECDSA nonce</li>\n\t<li><code># q [hex]</code>: Curve order</li>\n\t<li><code># r [hex]</code>: First component of the ECDSA signature</li>\n\t<li><code># s [hex]</code>: Second component of the ECDSA signature</li>\n\t<li><code># x [hex]</code>: Ground truth ECDSA private key</li>\n\t<li><code># y [hex] [hex]</code>: Public key coordinates</li>\n\t<li><code># leak_pad [int],[int],[int]</code>: Leakage recovered during backtracking. Example: <code>0,4,15 =&gt; 0 = k % 2**4 = k &amp; 15</code></li>\n</ul>\n\n<p>Tooling</p>\n\n<p>The <code>recover_z.py</code> script</p>\n\n<ul>\n\t<li>Loads a trace.</li>\n\t<li>Recovers the corresponding Z coordinate from the trace data.</li>\n\t<li>verifies the recovered Z matches the ground truth Z.</li>\n</ul>\n\n<p>Example</p>\n\n<p>Unpack the data:</p>\n\n<pre><code>tar xf traces.tar.gz</code></pre>\n\n<p>Run the tooling on trace index 123:</p>\n\n<pre><code>$ python2 recover_z.py 123\nINFO:recovered Z:65b9b7006bc7b030218bef1b6e569f9f7acaee059b53d669388c6b860f67e213\nINFO:     real Z:65b9b7006bc7b030218bef1b6e569f9f7acaee059b53d669388c6b860f67e213</code></pre>\n\n<p>The output demonstrates the recovered Z coordinate is correct, i.e. matches the ground truth.</p>\n\n<p>Credits</p>\n\n<p>Authors</p>\n\n<ul>\n\t<li>Alejandro Cabrera Aldaya (Tampere University, Tampere, Finland)</li>\n\t<li>Cesar Pereida Garc&iacute;a (Tampere University, Tampere, Finland)</li>\n\t<li>Billy Bob Brumley (Tampere University, Tampere, Finland)</li>\n</ul>\n\n<p>Funding</p>\n\n<p>This project has received funding from the European Research Council (ERC) under the European Union&rsquo;s Horizon 2020 research and innovation programme (grant agreement No 804476).</p>\n\n<p>License</p>\n\n<p>This project is distributed under MIT license.</p>\n\n<p>&nbsp;</p>", 
  "license": "https://opensource.org/licenses/MIT", 
  "creator": [
    {
      "affiliation": "Tampere University", 
      "@id": "https://orcid.org/0000-0002-1544-6772", 
      "@type": "Person", 
      "name": "Aldaya, Alejandro Cabrera"
    }, 
    {
      "affiliation": "Tampere University", 
      "@id": "https://orcid.org/0000-0001-6812-8498", 
      "@type": "Person", 
      "name": "Pereida Garcia, Cesar"
    }, 
    {
      "affiliation": "Tampere University", 
      "@id": "https://orcid.org/0000-0001-9160-0463", 
      "@type": "Person", 
      "name": "Brumley, Billy Bob"
    }
  ], 
  "url": "https://zenodo.org/record/3752635", 
  "datePublished": "2020-04-15", 
  "version": "1", 
  "@type": "Dataset", 
  "keywords": [
    "side-channel analysis", 
    "ECDSA", 
    "CVE-2020-11735", 
    "CVE-2020-10932", 
    "applied cryptography", 
    "libgcrypt", 
    "mbedTLS", 
    "WolfSSL"
  ], 
  "@context": "https://schema.org/", 
  "distribution": [
    {
      "contentUrl": "https://zenodo.org/api/files/bfe2f08a-0c31-431e-ba96-08c0ec74ddb8/LICENSE", 
      "encodingFormat": "", 
      "@type": "DataDownload"
    }, 
    {
      "contentUrl": "https://zenodo.org/api/files/bfe2f08a-0c31-431e-ba96-08c0ec74ddb8/README.md", 
      "encodingFormat": "md", 
      "@type": "DataDownload"
    }, 
    {
      "contentUrl": "https://zenodo.org/api/files/bfe2f08a-0c31-431e-ba96-08c0ec74ddb8/recover_z.py", 
      "encodingFormat": "py", 
      "@type": "DataDownload"
    }, 
    {
      "contentUrl": "https://zenodo.org/api/files/bfe2f08a-0c31-431e-ba96-08c0ec74ddb8/traces.tar.gz", 
      "encodingFormat": "gz", 
      "@type": "DataDownload"
    }
  ], 
  "identifier": "https://doi.org/10.5281/zenodo.3752635", 
  "@id": "https://doi.org/10.5281/zenodo.3752635", 
  "workFeatured": {
    "url": "https://ches.iacr.org/2020/", 
    "alternateName": "CHES 2020", 
    "location": "Beijing, China", 
    "@type": "Event", 
    "name": "Conference on Cryptographic Hardware and Embedded Systems 2020"
  }, 
  "name": "From A to Z: Projective coordinates leakage in the wild: research data and tooling"
}
140
47
views
downloads
All versions This version
Views 140140
Downloads 4747
Data volume 2.3 GB2.3 GB
Unique views 123123
Unique downloads 2222

Share

Cite as