A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://cplusplus.github.io/LWG/issue4212 below:

Make the round states in [rand.eng.philox] explicit

-2- The generation algorithm returns Y i , the value stored in the ith element of Y after applying the transition algorithm.

-3- The state transition is performed as if by the following algorithm:
i=i+1
if (i == n) {
  Y=Philox(K, X) // see below
  Z=Z+1         // this updates X
  i=0
}

-4- The Philox function maps the length- n /2 sequence K and the length- n sequence X into a length- n output sequence Y . Philox applies an r -round substitution-permutation network to the values in X . A single round of the generation algorithm performs the following steps: That is, there are intermediate values X ( 0 ) , X ( 1 ) , …, X ( r ) , where X ( 0 ) :=X , and for each round q (with q=1,…,r ), X ( q ) is computed from X ( q - 1 ) as follows. The output sequence is X ( r ) .

  1. (4.1) — The output sequence X' of the previous round ( X in case of the first round) is permuted to obtain the intermediate state V :

    Vj=X'f
                n(j)
    

    An intermediate state V ( q ) is obtained by permuting the previous output, V j ( q ) := X f n ( j ) ( q - 1 ) , where j=0,…,n−1 , and f n (j) is defined in Table 124.

  2. (4.2) — The following computations are applied to the elements of the V sequence: The next output X ( q ) is computed from the elements of the V ( q ) as follows. For k=0,…,n/2-1,

    1. (4.2.?) — X 2 k + 0 ( q ) = mulhi( V 2 k ( q ) , M k ,w) xor K k ( q ) xor V 2 k + 1 ( q ) , and X 2 k + 0 = mulhi( V 2 k , M k ,w) xor key k q xor V 2 k + 1

    2. (4.2.?) — X 2 k + 1 ( q ) = mullo( V 2 k ( q ) , M k ,w), X 2 k + 1 = mullo( V 2 k , M k ,w)

    where :

    1. (4.2.1) — mullo( a,b,w ) is the low half of the modular multiplication of a and b : (a⋅b)mod2w ,

    2. (4.2.2) — mulhi( a,b,w ) is the high half of the modular multiplication of a and b : (⌊(a⋅b)/2w⌋) ,

    3. (4.2.3) — k=0,…,n/2−1 is the index in the sequences, K k ( q ) is the kth round key for round q , K k ( q ) :=( K k +(q-1)⋅ C k )mod2w ,

    4. (4.2.4) — q=0,…,r−1 is the index of the round, K k is the kth element of the key sequence K ,

    5. (4.2.5) — key k q is the kth round key for round q , key k q :=( K k +q⋅ C k )mod2w ,

    6. (4.2.6) — K k are the elements of the key sequence K ,

    7. (4.2.7) — M k is multipliers[ k ], and

    8. (4.2.8) — C k is round_consts[ k ].


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4