<commit_before>package edu.mit.anonauth;

import java.io.IOException;
import java.lang.Math;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.Collections; 
import java.util.HashMap; 
import java.util.Random;

public class ProtocolSecret {
    private byte[] secretHash;
    private byte[] challenge;
    private List<SecretBox> secrets;  // List of polynomials.  Index corresponds to poly degree.  
    private HashMap<String, List<Point>> userPoints = new HashMap<String, List<Point>>();  
    // Hashes username to their list of private points/secret shares
    private List<Point> publicPoints;   // current public points, reset w/ revoke.  
    private List<String> blacklist;  // List of usernames revoked.  
    private int polyDegree;  // k = current degree of polynomial
    private static int maxPolyDegree = 2;  // r = max. degree of polynomial
    
    public ProtocolSecret() {
        setUpScheme();
    }
    
    public void setUpScheme() {
        polyDegree = 1;
        // maxPolyDegree = 2;
        secrets = new ArrayList<SecretBox>();
        // One-time run to hardcode the boxes.
        List<BigInteger> coeffs1 = randomSecretBox(1).getCoefficients; 
        List<BigInteger> coeffs2 = randomSecretBox(2).getCoefficients;
        System.println(coeffs1);
        System.println(coeffs2);
        SecretBox box1 = fromCoefficients(coeffs1);
        SecretBox box2 = fromCoefficients(coeffs2);

        // How do we initialize the secret hash and challenge?  
        secretHash = box1.secretHash();  // Must be 32 bytes
        // challenge = new byte[16];
        challenge = cleanByteArray(new BigInteger(16, rand), 16);
    }
    
    /* 
    Format of the command:
    1 byte = k (# points)
    y = 16 bytes
    x = 2 bytes
    Hash of secret - 32 bytes
    Challenge - 16 bytes
    */
    public byte[] getBroadcast(){
        byte[] command = new byte[]{};
        command[0] = (byte) polyDegree;  // k = 1;
        for (int i = 0; i < polyDegree; i++) {
            // Need k points in command.
            Point p = publicPoints.get(i);<commit_msg>Got rid of unnecessary lines<commit_after>package edu.mit.anonauth;

import java.io.IOException;
import java.lang.Math;
import java.lang.ref.WeakReference;
import java.util.Arrays;
import java.util.Collections; 
import java.util.HashMap; 
import java.util.Random;

public class ProtocolSecret {
    private byte[] secretHash;
    private byte[] challenge;
    private List<SecretBox> secrets;  // List of polynomials.  Index corresponds to poly degree.  
    private HashMap<String, List<Point>> userPoints = new HashMap<String, List<Point>>();  
    // Hashes username to their list of private points/secret shares
    private List<Point> publicPoints;   // current public points, reset w/ revoke.  
    private List<String> blacklist;  // List of usernames revoked.  
    private int polyDegree;  // k = current degree of polynomial
    private static int maxPolyDegree = 2;  // r = max. degree of polynomial
    
    public ProtocolSecret() {
        setUpScheme();
    }
    
    public void setUpScheme() {
        polyDegree = 1;
        // maxPolyDegree = 2;
        secrets = new ArrayList<SecretBox>();
        // One-time run to hardcode the boxes.
        List<BigInteger> coeffs1 = randomSecretBox(1).getCoefficients; 
        System.println(coeffs1);
        SecretBox box1 = fromCoefficients(coeffs1);

        // How do we initialize the secret hash and challenge?  
        secretHash = box1.secretHash();  // Must be 32 bytes
        // challenge = new byte[16];
        challenge = cleanByteArray(new BigInteger(16, rand), 16);
    }
    
    /* 
    Format of the command:
    1 byte = k (# points)
    y = 16 bytes
    x = 2 bytes
    Hash of secret - 32 bytes
    Challenge - 16 bytes
    */
    public byte[] getBroadcast(){
        byte[] command = new byte[]{};
        command[0] = (byte) polyDegree;  // k = 1;
        for (int i = 0; i < polyDegree; i++) {
            // Need k points in command.
            Point p = publicPoints.get(i);
{'fraction_non_alphanumeric': 0.10282208588957055, 'fraction_numerical': 0.014969325153374234, 'mean_word_length': 2.5017182130584192, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 22, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5382817', 'n_tokens_mistral': 1229, 'n_tokens_neox': 1175, 'n_words': 378}