cloud9_root/src/cloud9/lib/Core/CacheDriver.cpp
// checker to detect sequence-based side-channel attack
checker to detect sequence-based side-channel attack
checker to detect sequence - based side - channel attack
void CacheDriver::checkForSeqAttack(ExecutionState& state, TimingSolver* solver) {
	for (unsigned II = 0; II < state.memAddrs.size(); II++) {
		if (seqConstraintLog.count(II)) {
			int nsolutionHit = solveAllConstraints(state, solver, seqConstraintLog[II].second, SOL_THRESHOLD);
			fprintf(stdout, "\n\n..... #solutions for #%u access hit = %d .....\n", II+1 , nsolutionHit);
			fprintf(stdout, "..... probability to infer input = (1/%d) .....\n", nsolutionHit);
			if (nsolutionHit == 0) continue;
			int nsolutionMiss = solveAllConstraints(state, solver, seqConstraintLog[II].first, SOL_THRESHOLD);
			fprintf(stdout, "\n\n..... #solutions for #%u access miss = %d .....\n", II+1 , nsolutionMiss);
			fprintf(stdout, "..... probability to infer input = (1/%d) .....\n", nsolutionMiss);
		}
	}
	fprintf(stdout, "\n\n########## Solver terminates, we are done here ##########\n\n");
	fflush(stdout);
}
void CacheDriver :: checkForSeqAttack ( ExecutionState & state , TimingSolver * solver ) { for ( unsigned II = 0 ; II < state . memAddrs . size ( ) ; II ++ ) { if ( seqConstraintLog . count ( II ) ) { int nsolutionHit = solveAllConstraints ( state , solver , seqConstraintLog [ II ] . second , SOL_THRESHOLD ) ; fprintf ( stdout , " \n \n \n " , II + 1 , nsolutionHit ) ; fprintf ( stdout , " \n " , nsolutionHit ) ; if ( nsolutionHit == 0 ) continue ; int nsolutionMiss = solveAllConstraints ( state , solver , seqConstraintLog [ II ] . first , SOL_THRESHOLD ) ; fprintf ( stdout , " \n \n \n " , II + 1 , nsolutionMiss ) ; fprintf ( stdout , " \n " , nsolutionMiss ) ; } } fprintf ( stdout , " \n \n \n \n " ) ; fflush ( stdout ) ; }
checker to detect sequence-based side-channel attack
checker to detect sequence - based side - channel attack
/* for each observation cache access, check how many keys could lead to hit/miss */