code: public static int multiply( int x , int y , int primitive , int domain ) {
  		int r = 0;
  		while( y > 0 ) {
  			if( (y&1) != 0 ) {
  				r = r ^ x;
  			}
  			y = y >> 1;
  			x = x << 1;
  
  			if( x >= domain) {
  				x ^= primitive;
  			}
  		}
  		return r;
  	}
docs: Implementation of multiplication with a primitive polynomial. The result will be a member of the same field
  as the inputs, provided primitive is an appropriate irreducible polynomial for that field.
  
  Uses 'Russian Peasant Multiplication' that should be a faster algorithm.
  
  @param x polynomial
  @param y polynomial
  @param primitive Primitive polynomial which is irreducible.
  @param domain Value of a the largest possible value plus 1. E.g. GF(2**8) would be 256
  @return result polynomial