Skip to content

Validation Algorithms #2

Description

@hairyharryspider

Return true will break out of the function

Should be or and not and

     if not (is_prime(p) and is_prime(q)):
        return False
     if not (powmod(g, q, p) == 1 and g > 1 and (p - 1) % q == 0):
        return False
     return True


def validate_sign(r, s, q):
    if r <= 0 or r >= q:
        return False
    if s <= 0 or s >= q:
        return False
    return True```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions