public class StatTest03 extends Task
Usage: java pj2 StatTest03 [-v] dfreq Nlen Plen Slen reps seed
The program performs reps repetitions in parallel. For each repetition, the program picks a random key; a random nonce of length Nlen; and a random plaintext of length Plen using the digram frequencies in the dfreq file. The final Slen letters of the plaintext constitute the signature. The program computes the ciphertext from the key, nonce, and plaintext. The program alters one letter in the nonce or the ciphertext, decrypts the result, checks whether the decrypted signature is the same as the original signature (a false positive authentication), and repeats for every possible alteration. For each nonce and ciphertext position, the program counts how many alterations resulted in a false positive authentication and computes the probability of such.
The program prints the total number of false positive authentications and the probability of such over all the nonce and ciphertext positions and over all the repetitions. If the -v flag is specified, the program also prints this data for each individual nonce and ciphertext position.
ALL_CORES, ALL_GPUS, ANY_NODE_NAME, DEFAULT_CHUNK, DEFAULT_CORES, DEFAULT_GPUS, DEFAULT_NODE_NAME, DEFAULT_SCHEDULE, DEFAULT_THREADS, dynamic, fixed, guided, leapfrog, proportional, STANDARD_CHUNK, THREADS_EQUALS_CORES
Constructor and Description |
---|
StatTest03() |
Modifier and Type | Method and Description |
---|---|
void |
main(String[] args)
Main program.
|
actualThreads, addTupleListener, chunk, chunk, cores, cores, coresRequired, getMatchingTuple, gpus, gpus, gpusRequired, groupSize, initialChunk, initialSchedule, initialThreads, matchingTupleCount, nodeName, nodeName, nodeNameRequired, parallelDo, parallelDo, parallelFor, parallelFor, parallelFor, putTuple, putTuple, readTuple, schedule, schedule, takeTuple, taskRank, terminate, threads, threads, tryToReadTuple, tryToTakeTuple, workerFor
Copyright © 2017 by Alan Kaminsky. All rights reserved. Send comments to ark@cs.rit.edu.