-
Notifications
You must be signed in to change notification settings - Fork 0
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: tss security question #10
base: alpha
Are you sure you want to change the base?
Conversation
add input_share delete_question add check at set_question
// secp256k1 curve | ||
public let secpN = "fffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141" | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are we directly exposing the encrypt and decrypt methods here?
All the logic around this and setting the relevant general store domain should be handled internally, no?
i.e How would we be able to tell that the library is behaving the same way in all situations? Should this not be implemented as a module alongside the security_question module in the library?
/// - Returns: `` | ||
/// | ||
/// - Throws: `RuntimeError`, indicates invalid parameters was used or invalid threshold key or fail to change security question | ||
public static func change_security_question( threshold : ThresholdKey, newQuestion: String, newAnswer: String, answer: String, tag: String) async throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why tag is required, cant we just read it from threshold key, we are not taking tag as input in web.
/// - Returns: `` | ||
/// | ||
/// - Throws: `RuntimeError`, indicates invalid parameters was used or invalid threshold key of failed to set security question | ||
public static func set_security_question( threshold : ThresholdKey, question: String, answer: String, factorKey :String, tag: String ) async throws { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why tag is required here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also in web, factor key is optional but here it seems mandatory
/// | ||
/// - Throws: `RuntimeError`, indicates invalid parameters was used or invalid threshold key or fail to change security question | ||
public static func change_security_question( threshold : ThresholdKey, newQuestion: String, newAnswer: String, answer: String, tag: String) async throws { | ||
let domainKey = TssSecurityQuestion + ":" + tag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this domain key same in web?
/// - Returns: `String` public key of the factor | ||
/// | ||
/// - Throws: `RuntimeError`, indicates invalid parameters was used or invalid threshold key or fail to delete security question | ||
public static func delete_security_question( threshold : ThresholdKey, tag: String) async throws -> String { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should check if thesholdKey is initialized and has metadata key before allowing further.
add tests to check for compatiblity with web |
to threshold_key class
fix tests
fix multipart form data
due to 'type' backward compatible
No description provided.