jodd-core/src/main/java/jodd/crypt/Threefish.java
private void keySchedule(final int s) {
		for (int i = 0; i < nw; i++) {
			// just put in the main key first
			ksd[i] = k[(s + i) % (nw + 1)];

			// don't add anything for i = 0,...,Nw - 4
			if (i == nw - 3) { // second to last
				ksd[i] += t[s % TWEAK_VALUES];
			} else if (i == nw - 2) { // first to last
				ksd[i] += t[(s + 1) % TWEAK_VALUES];
			} else if (i == nw - 1) { // last
				ksd[i] += s;
			}
		}
	}
private void keySchedule(final int s) {
		for (int i = 0; i < nw; i++) {
			// just put in the main key first
			ksd[i] = k[(s + i) % (nw + 1)];

			// don't add anything for i = 0,...,Nw - 4
			if (i == nw - 3) { // second to last
				ksd[i] += t[s % TWEAK_VALUES];
			} else if (i == nw - 2) { // first to last
				ksd[i] += t[(s + 1) % TWEAK_VALUES];
			} else if (i == nw - 1) { // last
				ksd[i] += s;
			}
		}
	}
private void keySchedule ( final int s ) { for ( int i = 0 ; i < nw ; i ++ ) { // just put in the main key first ksd [ i ] = k [ ( s + i ) % ( nw + 1 ) ] ; // don't add anything for i = 0,...,Nw - 4 if ( i == nw - 3 ) { // second to last ksd [ i ] += t [ s % TWEAK_VALUES ] ; } else if ( i == nw - 2 ) { // first to last ksd [ i ] += t [ ( s + 1 ) % TWEAK_VALUES ] ; } else if ( i == nw - 1 ) { // last ksd [ i ] += s ; } } }
Creates the subkeys.

@param s the value of the round devided by 4
Creates the subkeys .