meck93/evote-crypto

View on GitHub

Showing 4 of 940 total issues

Function generateNoProof has 29 lines of code (exceeds 25 allowed). Consider refactoring.
Open

export const generateNoProof = (
encryptedVote: Cipher,
params: SystemParameters | SystemParametersSerialized,
publicKey: CurvePoint | string,
id: string
Severity: Minor
Found in src/ec-elgamal/proofs/membership.ts - About 1 hr to fix

    Function generateYesProof has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export const generateYesProof = (
    encryptedVote: Cipher,
    params: SystemParameters | SystemParametersSerialized,
    publicKey: CurvePoint | string,
    id: string
    Severity: Minor
    Found in src/ec-elgamal/proofs/membership.ts - About 1 hr to fix

      Function generateNoProof has 26 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export const generateNoProof = (
      cipher: Cipher,
      sp: SystemParameters,
      pk: BN,
      uniqueID: string
      Severity: Minor
      Found in src/ff-elgamal/proofs/membership.ts - About 1 hr to fix

        Function getPrimitiveRoots has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
        Open

        export const getPrimitiveRoots = (n: number): number[] => {
        if (!isPrime(n)) {
        return []
        }
         
         
        Severity: Minor
        Found in src/ff-elgamal/helper.ts - About 25 mins to fix
        Severity
        Category
        Status
        Source
        Language