Skip to content

Creation#3

Merged
arkavo-com merged 5 commits intomainfrom
feature/creation
Jun 10, 2024
Merged

Creation#3
arkavo-com merged 5 commits intomainfrom
feature/creation

Conversation

@arkavo-com
Copy link
Copy Markdown
Contributor

@arkavo-com arkavo-com commented Jun 9, 2024

Implement NanoTDF creation and adjustment of encryption payload

New functions for creating a Nano Document Format (NanoTDF) and adjusting the encryption payload have been added. This reflects changes in the Policy, EmbeddedPolicyBody, and KasMetadata structures. An adjustNonce method has also been introduced to pad or trim the nonce to the required length. Besides, the impact on related tests and other classes has been managed.

Refactor code for readability and conciseness

Removed unused code and refactored the signature generation process. Updated the 'addSignatureToNanoTDF' function to handle exceptions thrown by the 'generateECDSASignature'. Tests and other components using these methods have been updated accordingly. Added new files CryptoHelperTests.swift and InitializationTests.swift for better testing framework.

Removed unused code and refactored the signature generation process. Updated the 'addSignatureToNanoTDF' function to handle exceptions thrown by the 'generateECDSASignature'. Tests and other components using these methods have been updated accordingly. Added new files CryptoHelperTests.swift and InitializationTests.swift for better testing framework.
This commit adds a new BinaryParser class to handle encoding and decoding tasks. It also includes changes in CryptoHelperTests.swift for improved key pair generation, and updates to the main project configuration to include the BinaryParser.swift file in project sources. Finally, it removes duplicative coding from the NanoTDF.swift file to make use of the newly-added BinaryParser class.
New functions for creating a Nano Document Format (NanoTDF) and adjusting the encryption payload have been added. This reflects changes in the Policy, EmbeddedPolicyBody, and KasMetadata structures. An adjustNonce method has also been introduced to pad or trim the nonce to the required length. Besides, the impact on related tests and other classes has been managed.
This commit includes modifications to handling of key access in BinaryParser and changes the way the ephemeral public key data is represented in NanoTDF. Removed redundant code in BinaryParser by eliminating unnecessary if-else checks and updated how bindingSize is calculated. Some previously commented code in the test suite has been uncommented and refined, ensuring a more accurate validation of our tests. Now, the test suite also checks the existence of the ephemeral public key.
@arkavo-com arkavo-com marked this pull request as ready for review June 10, 2024 03:59
This commit updates test method naming, removing underscore from the name to enhance readability and consistency. Changes were made to the "BinaryParser" where an optional "keyAccess" is now properly handled. A non-functional test case "testCreateNanoTDFWithInvalidKasMetadata" was also removed from "NanoTDFCreationTests".
@sonarqubecloud
Copy link
Copy Markdown

Quality Gate Passed Quality Gate passed

Issues
2 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@arkavo-com arkavo-com merged commit e56294e into main Jun 10, 2024
@arkavo-com arkavo-com deleted the feature/creation branch June 10, 2024 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant