<commit_before>#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "keys.h"

static rsa_int test_values[NUM_TESTS];

/* `generate_candidate` generates a random rsa_int number */
rsa_int generate_candidate()
{
    rsa_int n = 1;
    rsa_int r;
    int i, lsb;
    n <<= (NUM_BITS - 1);
    n |= 1;
    r = rand();
    for(i = 0; i < NUM_BITS - 2; i ++) {
        r = rand();
#ifdef RSA_TRACE
        printf("Random Number %d: %d\n", i + 1, r);
#endif
        lsb = r & 1;
#ifdef RSA_TRACE
        printf("Extracted Bit: %d\n", lsb);
#endif
        lsb <<= i + 1;
        n |= lsb;<commit_msg>Added trace<commit_after>#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include "keys.h"
#include "trace.h"

static rsa_int test_values[NUM_TESTS];

/* `generate_candidate` generates a random rsa_int number */
rsa_int generate_candidate()
{
    rsa_int n = 1;
    rsa_int r;
    int i, lsb;
    n <<= (NUM_BITS - 1);
    n |= 1;
    r = rand();
    for(i = 0; i < NUM_BITS - 2; i ++) {
        r = rand();
        trace("Random Number %d: %d\n", i + 1, r);
        lsb = r & 1;
        trace("Extracted Bit: %d\n", lsb);
        lsb <<= i + 1;
        n |= lsb;
{'fraction_non_alphanumeric': 0.17147568013190437, 'fraction_numerical': 0.013190436933223413, 'mean_word_length': 2.4390934844192635, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 11, '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': '4160992', 'n_tokens_mistral': 514, 'n_tokens_neox': 488, 'n_words': 134}