mirror of
				https://git.wownero.com/wownero/RandomWOW.git
				synced 2024-08-15 00:23:14 +00:00 
			
		
		
		
	
						commit
						ae1377c0d7
					
				
					 3 changed files with 21 additions and 25 deletions
				
			
		|  | @ -175,10 +175,10 @@ template void fillAes1Rx4<false>(void *state, size_t outputSize, void *buffer); | |||
| //key0, key1, key2, key3 = Blake2b-512("RandomX AesGenerator4R keys 0-3")
 | ||||
| //key4, key5, key6, key7 = Blake2b-512("RandomX AesGenerator4R keys 4-7")
 | ||||
| 
 | ||||
| #define AES_GEN_4R_KEY0 0x99e5d23f, 0x2f546d2b, 0xd1833ddb, 0x6421aadd | ||||
| #define AES_GEN_4R_KEY1 0xa5dfcde5, 0x06f79d53, 0xb6913f55, 0xb20e3450 | ||||
| #define AES_GEN_4R_KEY2 0x171c02bf, 0x0aa4679f, 0x515e7baf, 0x5c3ed904 | ||||
| #define AES_GEN_4R_KEY3 0xd8ded291, 0xcd673785, 0xe78f5d08, 0x85623763 | ||||
| #define AES_GEN_4R_KEY0 0xcf359e95, 0x141f82b7, 0x7ffbe4a6, 0xf890465d | ||||
| #define AES_GEN_4R_KEY1 0x6741ffdc, 0xbd5c5ac3, 0xfee8278a, 0x6a55c450 | ||||
| #define AES_GEN_4R_KEY2 0x3d324aac, 0xa7279ad2, 0xd524fde4, 0x114c47a4 | ||||
| #define AES_GEN_4R_KEY3 0x76f6db08, 0x42d3dbd9, 0x99a9aeff, 0x810c3a2a | ||||
| #define AES_GEN_4R_KEY4 0x229effb4, 0x3d518b6d, 0xe3d6a7a6, 0xb5826f73 | ||||
| #define AES_GEN_4R_KEY5 0xb272b7d2, 0xe9024d4e, 0x9c10b3d9, 0xc7566bf3 | ||||
| #define AES_GEN_4R_KEY6 0xf63befa7, 0x2ba9660a, 0xf765a38b, 0xf273c9e7 | ||||
|  | @ -197,10 +197,6 @@ void fillAes4Rx4(void *state, size_t outputSize, void *buffer) { | |||
| 	key1 = rx_set_int_vec_i128(AES_GEN_4R_KEY1); | ||||
| 	key2 = rx_set_int_vec_i128(AES_GEN_4R_KEY2); | ||||
| 	key3 = rx_set_int_vec_i128(AES_GEN_4R_KEY3); | ||||
| 	key4 = rx_set_int_vec_i128(AES_GEN_4R_KEY4); | ||||
| 	key5 = rx_set_int_vec_i128(AES_GEN_4R_KEY5); | ||||
| 	key6 = rx_set_int_vec_i128(AES_GEN_4R_KEY6); | ||||
| 	key7 = rx_set_int_vec_i128(AES_GEN_4R_KEY7); | ||||
| 
 | ||||
| 	state0 = rx_load_vec_i128((rx_vec_i128*)state + 0); | ||||
| 	state1 = rx_load_vec_i128((rx_vec_i128*)state + 1); | ||||
|  | @ -210,23 +206,23 @@ void fillAes4Rx4(void *state, size_t outputSize, void *buffer) { | |||
| 	while (outptr < outputEnd) { | ||||
| 		state0 = aesdec<softAes>(state0, key0); | ||||
| 		state1 = aesenc<softAes>(state1, key0); | ||||
| 		state2 = aesdec<softAes>(state2, key4); | ||||
| 		state3 = aesenc<softAes>(state3, key4); | ||||
| 		state2 = aesdec<softAes>(state2, key0); | ||||
| 		state3 = aesenc<softAes>(state3, key0); | ||||
| 
 | ||||
| 		state0 = aesdec<softAes>(state0, key1); | ||||
| 		state1 = aesenc<softAes>(state1, key1); | ||||
| 		state2 = aesdec<softAes>(state2, key5); | ||||
| 		state3 = aesenc<softAes>(state3, key5); | ||||
| 		state2 = aesdec<softAes>(state2, key1); | ||||
| 		state3 = aesenc<softAes>(state3, key1); | ||||
| 
 | ||||
| 		state0 = aesdec<softAes>(state0, key2); | ||||
| 		state1 = aesenc<softAes>(state1, key2); | ||||
| 		state2 = aesdec<softAes>(state2, key6); | ||||
| 		state3 = aesenc<softAes>(state3, key6); | ||||
| 		state2 = aesdec<softAes>(state2, key2); | ||||
| 		state3 = aesenc<softAes>(state3, key2); | ||||
| 
 | ||||
| 		state0 = aesdec<softAes>(state0, key3); | ||||
| 		state1 = aesenc<softAes>(state1, key3); | ||||
| 		state2 = aesdec<softAes>(state2, key7); | ||||
| 		state3 = aesenc<softAes>(state3, key7); | ||||
| 		state2 = aesdec<softAes>(state2, key3); | ||||
| 		state3 = aesenc<softAes>(state3, key3); | ||||
| 
 | ||||
| 		rx_store_vec_i128((rx_vec_i128*)outptr + 0, state0); | ||||
| 		rx_store_vec_i128((rx_vec_i128*)outptr + 1, state1); | ||||
|  |  | |||
|  | @ -15,7 +15,7 @@ RANDOMX_SCRATCHPAD_L2 EQU 262144t | |||
| RANDOMX_SCRATCHPAD_L1 EQU 16384t | ||||
| RANDOMX_JUMP_BITS EQU 8t | ||||
| RANDOMX_JUMP_OFFSET EQU 8t | ||||
| RANDOMX_FREQ_IADD_RS EQU 16t | ||||
| RANDOMX_FREQ_IADD_RS EQU 25t | ||||
| RANDOMX_FREQ_IADD_M EQU 7t | ||||
| RANDOMX_FREQ_ISUB_R EQU 16t | ||||
| RANDOMX_FREQ_ISUB_M EQU 7t | ||||
|  | @ -29,19 +29,19 @@ RANDOMX_FREQ_IMUL_RCP EQU 8t | |||
| RANDOMX_FREQ_INEG_R EQU 2t | ||||
| RANDOMX_FREQ_IXOR_R EQU 15t | ||||
| RANDOMX_FREQ_IXOR_M EQU 5t | ||||
| RANDOMX_FREQ_IROR_R EQU 8t | ||||
| RANDOMX_FREQ_IROL_R EQU 2t | ||||
| RANDOMX_FREQ_IROR_R EQU 10t | ||||
| RANDOMX_FREQ_IROL_R EQU 0t | ||||
| RANDOMX_FREQ_ISWAP_R EQU 4t | ||||
| RANDOMX_FREQ_FSWAP_R EQU 4t | ||||
| RANDOMX_FREQ_FADD_R EQU 16t | ||||
| RANDOMX_FREQ_FSWAP_R EQU 8t | ||||
| RANDOMX_FREQ_FADD_R EQU 20t | ||||
| RANDOMX_FREQ_FADD_M EQU 5t | ||||
| RANDOMX_FREQ_FSUB_R EQU 16t | ||||
| RANDOMX_FREQ_FSUB_R EQU 20t | ||||
| RANDOMX_FREQ_FSUB_M EQU 5t | ||||
| RANDOMX_FREQ_FSCAL_R EQU 6t | ||||
| RANDOMX_FREQ_FMUL_R EQU 32t | ||||
| RANDOMX_FREQ_FMUL_R EQU 20t | ||||
| RANDOMX_FREQ_FDIV_M EQU 4t | ||||
| RANDOMX_FREQ_FSQRT_R EQU 6t | ||||
| RANDOMX_FREQ_CBRANCH EQU 25t | ||||
| RANDOMX_FREQ_CBRANCH EQU 16t | ||||
| RANDOMX_FREQ_CFROUND EQU 1t | ||||
| RANDOMX_FREQ_ISTORE EQU 16t | ||||
| RANDOMX_FREQ_NOP EQU 0t | ||||
|  |  | |||
|  | @ -67,7 +67,7 @@ namespace randomx { | |||
| 	constexpr int wtSum = RANDOMX_FREQ_IADD_RS + RANDOMX_FREQ_IADD_M + RANDOMX_FREQ_ISUB_R + \ | ||||
| 		RANDOMX_FREQ_ISUB_M + RANDOMX_FREQ_IMUL_R + RANDOMX_FREQ_IMUL_M + RANDOMX_FREQ_IMULH_R + \ | ||||
| 		RANDOMX_FREQ_IMULH_M + RANDOMX_FREQ_ISMULH_R + RANDOMX_FREQ_ISMULH_M + RANDOMX_FREQ_IMUL_RCP + \ | ||||
| 		RANDOMX_FREQ_INEG_R + RANDOMX_FREQ_IXOR_R + RANDOMX_FREQ_IXOR_M + RANDOMX_FREQ_IROR_R + RANDOMX_FREQ_IROL_R + RANDOMX_FREQ_ISWAP_R + \ | ||||
| 		RANDOMX_FREQ_INEG_R + RANDOMX_FREQ_IXOR_R + RANDOMX_FREQ_IXOR_M + RANDOMX_FREQ_IROR_R + RANDOMX_FREQ_ISWAP_R + \ | ||||
| 		RANDOMX_FREQ_FSWAP_R + RANDOMX_FREQ_FADD_R + RANDOMX_FREQ_FADD_M + RANDOMX_FREQ_FSUB_R + RANDOMX_FREQ_FSUB_M + \ | ||||
| 		RANDOMX_FREQ_FSCAL_R + RANDOMX_FREQ_FMUL_R + RANDOMX_FREQ_FDIV_M + RANDOMX_FREQ_FSQRT_R + RANDOMX_FREQ_CBRANCH + \ | ||||
| 		RANDOMX_FREQ_CFROUND + RANDOMX_FREQ_ISTORE + RANDOMX_FREQ_NOP; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue