Changes

Jump to: navigation, search

DPS915 C U D A B O Y S

960 bytes added, 15:17, 5 November 2015
Description
S[j] = temp;
return S[(S[i] + S[j]) & 0xFF];
}
 
 
Creating Kernels
 
/**
* Description: RC4 Cuda Kernel
**/
__global__ void getRC4Buffer(char * buffer, int bufferSize) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < bufferSize)
buffer[idx] = buffer[idx] ^ rc4_output();
}
 
/**
* Description: Cycle Cuda Kernel
**/
__global__ void getCycleBuffer(char * buffer, int bufferSize) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < bufferSize)
buffer[idx] = cycle(buffer[idx]);
}
 
/**
* Description: Inversion Cuda Kernel
**/
__global__ void getInversionBuffer(char * buffer, int bufferSize) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < bufferSize)
buffer[idx] = ~buffer[idx];
}
 
/**
* Description: XOR Cuda Kernel
**/
__global__ void getXorBuffer(char * buffer, char * keyBuffer, int bufferSize) {
int idx = blockIdx.x * blockDim.x + threadIdx.x;
if (idx < bufferSize)
buffer[idx] = buffer[idx] ^ keyBuffer[idx];
}

Navigation menu