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

feat: simplify structured encryption #866

Merged
merged 46 commits into from
May 13, 2024
Merged
Changes from 1 commit
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
4255ee1
feat: simplify structured encryption
ajewellamz Mar 27, 2024
7cc2b24
AuthenticateAction
ajewellamz Mar 28, 2024
563bf22
StructuredData
ajewellamz Mar 28, 2024
8375a60
verification time
ajewellamz Mar 28, 2024
fd9992b
verification time
ajewellamz Mar 28, 2024
0140e8c
verification speed
ajewellamz Mar 28, 2024
90acfc4
specs
ajewellamz Mar 29, 2024
e904b71
revert Paths.dfy
ajewellamz Mar 29, 2024
4b31c89
move to sequence of Path
ajewellamz Apr 11, 2024
e5bc34b
cleanup
ajewellamz Apr 11, 2024
5ff1c22
verification
ajewellamz Apr 11, 2024
ee7c679
format
ajewellamz Apr 11, 2024
0a81f47
verification
ajewellamz Apr 11, 2024
917c6d4
verification
ajewellamz Apr 11, 2024
8ab7586
m
ajewellamz Apr 12, 2024
c1c6d5b
fix
ajewellamz Apr 12, 2024
4ee5581
m
ajewellamz Apr 14, 2024
44dbc81
verification
ajewellamz Apr 21, 2024
ca9c757
merge from main
ajewellamz Apr 21, 2024
6f3b8a8
merge from main
ajewellamz Apr 21, 2024
cc942d0
m
ajewellamz Apr 21, 2024
5be8142
m
ajewellamz Apr 21, 2024
f3a7973
verify
ajewellamz Apr 21, 2024
f48dc0a
format
ajewellamz Apr 21, 2024
535a3bf
duvet and specs
ajewellamz Apr 23, 2024
59f7001
format
ajewellamz Apr 23, 2024
313555c
repolymorph
ajewellamz Apr 23, 2024
f6d6e37
verify
ajewellamz Apr 23, 2024
d042829
m
ajewellamz Apr 24, 2024
2223ee2
Merge branch 'main' into ajewell/simplify
ajewellamz Apr 24, 2024
5e8c2d5
m
ajewellamz Apr 24, 2024
4fb4544
m
ajewellamz Apr 24, 2024
920fa16
Merge branch 'main' into ajewell/simplify
ajewellamz Apr 25, 2024
b69f2f5
Merge branch 'main' into ajewell/simplify
ajewellamz Apr 30, 2024
f94a464
clean up spec
ajewellamz Apr 30, 2024
77242bc
m
ajewellamz Apr 30, 2024
782d91f
changes documents
ajewellamz Apr 30, 2024
e54400c
ResolveAuthActions
ajewellamz May 6, 2024
e8c98bb
m
ajewellamz May 6, 2024
52a2183
Merge branch 'main' into ajewell/simplify
ajewellamz May 6, 2024
ebd4c14
duvet
ajewellamz May 7, 2024
e5f998e
cleanup
ajewellamz May 7, 2024
f8e9f27
m
ajewellamz May 7, 2024
ae87387
PR feedback
ajewellamz May 8, 2024
8eb5745
m
ajewellamz May 8, 2024
b597e30
Merge branch 'main' into ajewell/simplify
ajewellamz May 10, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge from main
ajewellamz committed Apr 21, 2024
commit 6f3b8a83303af22d905b0663e2fa8c3ccb0461be
2 changes: 2 additions & 0 deletions DynamoDbEncryption/.gitignore
Original file line number Diff line number Diff line change
@@ -3,3 +3,5 @@ ImplementationFromDafny.cs
TestsFromDafny.cs
**/bin
**/obj
node_modules
project.properties

Large diffs are not rendered by default.

Large diffs are not rendered by default.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -7,14 +7,10 @@
import java.util.Objects;

public class DecryptStructureOutput {
<<<<<<< HEAD

private final Map<String, StructuredDataTerminal> plaintextStructure;

private final Map<String, CryptoAction> cryptoSchema;
=======

private final StructuredData plaintextStructure;
>>>>>>> main

private final ParsedHeader parsedHeader;

@@ -45,7 +41,9 @@ public static Builder builder() {
}

public interface Builder {
Builder plaintextStructure(Map<String, StructuredDataTerminal> plaintextStructure);
Builder plaintextStructure(
Map<String, StructuredDataTerminal> plaintextStructure
);

Map<String, StructuredDataTerminal> plaintextStructure();

@@ -61,14 +59,10 @@ public interface Builder {
}

static class BuilderImpl implements Builder {
<<<<<<< HEAD

protected Map<String, StructuredDataTerminal> plaintextStructure;

protected Map<String, CryptoAction> cryptoSchema;
=======

protected StructuredData plaintextStructure;
>>>>>>> main

protected ParsedHeader parsedHeader;

@@ -80,7 +74,9 @@ protected BuilderImpl(DecryptStructureOutput model) {
this.parsedHeader = model.parsedHeader();
}

public Builder plaintextStructure(Map<String, StructuredDataTerminal> plaintextStructure) {
public Builder plaintextStructure(
Map<String, StructuredDataTerminal> plaintextStructure
) {
this.plaintextStructure = plaintextStructure;
return this;
}
@@ -113,18 +109,15 @@ public DecryptStructureOutput build() {
"Missing value for required field `plaintextStructure`"
);
}
<<<<<<< HEAD
if (Objects.isNull(this.cryptoSchema())) {
throw new IllegalArgumentException("Missing value for required field `cryptoSchema`");
if (Objects.isNull(this.cryptoSchema())) {
throw new IllegalArgumentException(
"Missing value for required field `cryptoSchema`"
);
}
if (Objects.isNull(this.parsedHeader())) {
throw new IllegalArgumentException("Missing value for required field `parsedHeader`");
=======
if (Objects.isNull(this.parsedHeader())) {
throw new IllegalArgumentException(
"Missing value for required field `parsedHeader`"
);
>>>>>>> main
}
return new DecryptStructureOutput(this);
}
Original file line number Diff line number Diff line change
@@ -7,14 +7,10 @@
import java.util.Objects;

public class EncryptStructureOutput {
<<<<<<< HEAD

private final Map<String, StructuredDataTerminal> encryptedStructure;

private final Map<String, CryptoAction> cryptoSchema;
=======

private final StructuredData encryptedStructure;
>>>>>>> main

private final ParsedHeader parsedHeader;

@@ -45,7 +41,9 @@ public static Builder builder() {
}

public interface Builder {
Builder encryptedStructure(Map<String, StructuredDataTerminal> encryptedStructure);
Builder encryptedStructure(
Map<String, StructuredDataTerminal> encryptedStructure
);

Map<String, StructuredDataTerminal> encryptedStructure();

@@ -61,14 +59,10 @@ public interface Builder {
}

static class BuilderImpl implements Builder {
<<<<<<< HEAD

protected Map<String, StructuredDataTerminal> encryptedStructure;

protected Map<String, CryptoAction> cryptoSchema;
=======

protected StructuredData encryptedStructure;
>>>>>>> main

protected ParsedHeader parsedHeader;

@@ -80,7 +74,9 @@ protected BuilderImpl(EncryptStructureOutput model) {
this.parsedHeader = model.parsedHeader();
}

public Builder encryptedStructure(Map<String, StructuredDataTerminal> encryptedStructure) {
public Builder encryptedStructure(
Map<String, StructuredDataTerminal> encryptedStructure
) {
this.encryptedStructure = encryptedStructure;
return this;
}
@@ -113,18 +109,15 @@ public EncryptStructureOutput build() {
"Missing value for required field `encryptedStructure`"
);
}
<<<<<<< HEAD
if (Objects.isNull(this.cryptoSchema())) {
throw new IllegalArgumentException("Missing value for required field `cryptoSchema`");
if (Objects.isNull(this.cryptoSchema())) {
throw new IllegalArgumentException(
"Missing value for required field `cryptoSchema`"
);
}
if (Objects.isNull(this.parsedHeader())) {
throw new IllegalArgumentException("Missing value for required field `parsedHeader`");
=======
if (Objects.isNull(this.parsedHeader())) {
throw new IllegalArgumentException(
"Missing value for required field `parsedHeader`"
);
>>>>>>> main
}
return new EncryptStructureOutput(this);
}
Original file line number Diff line number Diff line change
@@ -10,12 +10,7 @@
import software.amazon.cryptography.materialproviders.model.EncryptedDataKey;

public class ParsedHeader {
<<<<<<< HEAD
=======

private final CryptoSchema cryptoSchema;

>>>>>>> main
private final DBEAlgorithmSuiteId algorithmSuiteId;

private final List<EncryptedDataKey> encryptedDataKeys;
@@ -78,12 +73,7 @@ Builder storedEncryptionContext(
}

static class BuilderImpl implements Builder {
<<<<<<< HEAD
=======

protected CryptoSchema cryptoSchema;

>>>>>>> main
protected DBEAlgorithmSuiteId algorithmSuiteId;

protected List<EncryptedDataKey> encryptedDataKeys;
@@ -140,20 +130,10 @@ public Map<String, String> encryptionContext() {
}

public ParsedHeader build() {
<<<<<<< HEAD
if (Objects.isNull(this.algorithmSuiteId())) {
throw new IllegalArgumentException("Missing value for required field `algorithmSuiteId`");
=======
if (Objects.isNull(this.cryptoSchema())) {
throw new IllegalArgumentException(
"Missing value for required field `cryptoSchema`"
);
}
if (Objects.isNull(this.algorithmSuiteId())) {
throw new IllegalArgumentException(
"Missing value for required field `algorithmSuiteId`"
);
>>>>>>> main
}
if (Objects.isNull(this.encryptedDataKeys())) {
throw new IllegalArgumentException(

This file was deleted.

This file was deleted.