Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HashNameVocab should have SHA-3 Hash Functions #526

Closed
10 tasks done
ajnelson-nist opened this issue Mar 15, 2023 · 1 comment · Fixed by #527 or #530
Closed
10 tasks done

HashNameVocab should have SHA-3 Hash Functions #526

ajnelson-nist opened this issue Mar 15, 2023 · 1 comment · Fixed by #527 or #530

Comments

@ajnelson-nist
Copy link
Contributor

ajnelson-nist commented Mar 15, 2023

Background

FIPS-202 is the Standard that "specifies the Secure Hash Algorithm-3 (SHA-3) family of functions on binary data" (source: abstract).

UCO has a semi-open vocabulary HashNameVocab that lists some hash functions. It should be updated to include the SHA-3 functions specified in FIPS-202 section 6.1, which are spelled like this in that section:

  • SHA3-224
  • SHA3-256
  • SHA3-384
  • SHA3-512

Requirements

Requirement 1

UCO should standardize the representation of SHA-3 hash values, particularly with the spelling of their method names.

Risk / Benefit analysis

Benefits

  • This prevents confusion from potential extenders of HashNameVocab spelling SHA-3 functions in various manners (e.g. SHA-3-224 to parallel the narrative spelling of SHA-3).
  • This normalizes support for representing SHA-3 hashes provided by some data sources.

Risks

The submitter is unaware of risks associated with this change.

Competencies demonstrated

Competency 1

Digital Corpora provides SHA2-256 and SHA3-256 hashes (documented here) for reference data distribution files. This page lists the hashes for zips of files grouped by content type, excerpted from Govdocs1.

Competency Question 1.1

I downloaded xlsx.zip from that "by-type" page. What are the hashes I should expect to see on my downloaded file, kb:File-461e84c3-..., using today's state of UCO?

Result 1.1

See especially kb:Hash-f1cf2eed-....

{
  "@context": {
    "kb": "http://example.org/kb/",
    "uco-core": "https://ontology.unifiedcyberontology.org/uco/core/",
    "uco-observable": "https://ontology.unifiedcyberontology.org/uco/observable/",
    "uco-types": "https://ontology.unifiedcyberontology.org/uco/types/",
    "uco-vocabulary": "https://ontology.unifiedcyberontology.org/uco/vocabulary/",
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  "@graph": {
    "@id": "kb:File-461e84c3-3418-4dc7-b2e5-d36d3d55002a",
    "@type": "uco-observable:ArchiveFile",
    "uco-core:hasFacet": [
      {
        "@id": "kb:ContentDataFacet-e451b4a1-4f4f-4863-818c-e9274dbf84c3",
        "@type": "uco-observable:ContentDataFacet"
        "uco-observable:hash": [
          {
            "@id": "kb:Hash-1a44ad0b-f1d4-4e2c-a79f-bae30910f65f",
            "@type": "uco-types:Hash",
            "uco-types:hashMethod": {
              "@type": "uco-vocabulary:HashNameVocab",
              "@value": "SHA256"
            }
            "uco-types:hashValue": {
              "@type": "xsd:hexBinary",
              "@value": "058ddd92e78d7c00d9b3ca624ad88b72b5e5a773e08dfbfcb467ccac00fe31da"
            }
          },
          {
            "@id": "kb:Hash-f1cf2eed-0d77-41db-af25-946ed583c14f",
            "@type": "uco-types:Hash",
            "uco-types:hashMethod": "SHA3-256",
            "uco-types:hashValue": {
              "@type": "xsd:hexBinary",
              "@value": "d5451b3f54809d23075246576093cc665e5bfcc00c134b3cde57cd8ea6f9f52d"
            }
          }
        ],
        "uco-observable:sizeInBytes": 5702506
      }
    ]
  }
}

Competency Question 1.2

What would be the new triple if standardizing the SHA-3 family?

Result 1.2

{
  "@context": {
    "kb": "http://example.org/kb/",
    "uco-types": "https://ontology.unifiedcyberontology.org/uco/types/",
    "uco-vocabulary": "https://ontology.unifiedcyberontology.org/uco/vocabulary/",
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  "@graph": {
    {
      "@id": "kb:Hash-f1cf2eed-0d77-41db-af25-946ed583c14f",
      "uco-types:hashMethod": {
        "@type": "uco-vocabulary:HashNameVocab",
        "@value": "SHA3-256"
      }
    }
  }
}

The above would replace this triple:

{
  "@context": {
    "kb": "http://example.org/kb/",
    "uco-types": "https://ontology.unifiedcyberontology.org/uco/types/",
    "xsd": "http://www.w3.org/2001/XMLSchema#"
  },
  "@graph": {
    {
      "@id": "kb:Hash-f1cf2eed-0d77-41db-af25-946ed583c14f",
      "uco-types:hashMethod": "SHA3-256"
    }
  }
}

Solution suggestion

Add these strings to vocabulary:HashNameVocab:

  • SHA3-224
  • SHA3-256
  • SHA3-384
  • SHA3-512

Coordination

  • Tracking in Jira ticket OC-289
  • Administrative review completed, proposal announced to Ontology Committees (OCs) on 2023-03-15
  • Requirements development phase skipped - fast track proposal.
  • Solutions Approval to be discussed in OC meeting, 2023-03-23.
  • Solutions Approval vote occurred, passing, on 2023-03-23
  • Solutions development phase completed.
  • Backwards-compatible implementation merged into develop for the next release
  • develop state with backwards-compatible implementation merged into develop-2.0.0
  • Backwards-incompatible implementation merged into develop-2.0.0 (N/A)
  • Milestone linked
  • Documentation logged in pending release page
@ajnelson-nist
Copy link
Contributor Author

A pull request has not been implemented for this proposal just yet, but it should be expected to be quite similar in form to PR 334.

@ajnelson-nist ajnelson-nist added this to the UCO 1.2.0 milestone Mar 16, 2023
@ajnelson-nist ajnelson-nist linked a pull request Mar 16, 2023 that will close this issue
11 tasks
ajnelson-nist added a commit to casework/CASE-Archive that referenced this issue Mar 16, 2023
No effects were observed on Make-managed files.

References:
* ucoProject/UCO#526

Signed-off-by: Alex Nelson <[email protected]>
ajnelson-nist added a commit to casework/CASE-Examples that referenced this issue Mar 16, 2023
No effects were observed on Make-managed files.

References:
* ucoProject/UCO#526

Signed-off-by: Alex Nelson <[email protected]>
ajnelson-nist added a commit to casework/casework.github.io that referenced this issue Mar 16, 2023
A follow-on patch will regenerate Make-managed files.

References:
* ucoProject/UCO#526

Signed-off-by: Alex Nelson <[email protected]>
ajnelson-nist added a commit to casework/casework.github.io that referenced this issue Mar 16, 2023
References:
* ucoProject/UCO#526

Signed-off-by: Alex Nelson <[email protected]>
@ajnelson-nist ajnelson-nist linked a pull request Mar 28, 2023 that will close this issue
4 tasks
ajnelson-nist added a commit to casework/CASE-Utilities-Python that referenced this issue Mar 28, 2023
ajnelson-nist added a commit to casework/CASE-Utilities-Python that referenced this issue Apr 4, 2023
A follow-on patch will regenerate Make-managed files.

References:
* ucoProject/UCO#526

Signed-off-by: Alex Nelson <[email protected]>
ajnelson-nist added a commit to ajnelson-nist/CASE-Examples-QC that referenced this issue Apr 5, 2023
No effects were observed on Make-managed files.

References:
* ucoProject/UCO#526

Signed-off-by: Alex Nelson <[email protected]>
ajnelson-nist added a commit to casework/CASE-Corpora that referenced this issue Apr 5, 2023
A follow-on patch will regenerate Make-managed files.

References:
* ucoProject/UCO#526

Signed-off-by: Alex Nelson <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant