Skip to content

WIP: Symmetric crypto #193

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

Open
wants to merge 27 commits into
base: main
Choose a base branch
from
Open

Conversation

yilinwei
Copy link
Collaborator

Supersedes #115

Comment on lines 41 to 52
@js.native
private[bobcats] sealed trait AesCbcParams extends Algorithm

private[bobcats] object AesCbcParams {
def apply(iv: js.typedarray.ArrayBuffer): AesCbcParams =
js.Dynamic
.literal(
name = "AES-CBC",
iv = iv
)
.asInstanceOf[AesCbcParams]
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
@js.native
private[bobcats] sealed trait AesCbcParams extends Algorithm
private[bobcats] object AesCbcParams {
def apply(iv: js.typedarray.ArrayBuffer): AesCbcParams =
js.Dynamic
.literal(
name = "AES-CBC",
iv = iv
)
.asInstanceOf[AesCbcParams]
}
private[bobcats] sealed trait AesCbcParams extends js.Object with Algorithm {
val name: String
val iv: js.typedarray.ArrayBuffer
}
private[bobcats] object AesCbcParams {
def apply(_iv: js.typedarray.ArrayBuffer): AesCbcParams =
new AesCbcParams {
val name = "AES-CBC"
val iv = _iv
}
}

@yilinwei
Copy link
Collaborator Author

Some of the .rsp files are absolutely massive, I like the approach but I think that we'll just take a few of the test vectors. We're checking the plumbing after all; not the actual crypto.

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.

3 participants