Deprecated: Creation of dynamic property NewFoldLabs\WP\Module\MyProducts\ProductsApi::$namespace is deprecated in /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php on line 41
Deprecated: Creation of dynamic property NewFoldLabs\WP\Module\MyProducts\ProductsApi::$rest_base is deprecated in /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php on line 42
Warning: Cannot modify header information - headers already sent by (output started at /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php:41) in /home3/enderthr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php:41) in /home3/enderthr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php:41) in /home3/enderthr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php:41) in /home3/enderthr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php:41) in /home3/enderthr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php:41) in /home3/enderthr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php:41) in /home3/enderthr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
Warning: Cannot modify header information - headers already sent by (output started at /home3/enderthr/public_html/wp-content/plugins/bluehost-wordpress-plugin/vendor/newfold-labs/wp-module-my-products/includes/ProductsApi.php:41) in /home3/enderthr/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
{"id":106,"date":"2022-09-27T01:32:59","date_gmt":"2022-09-27T01:32:59","guid":{"rendered":"https:\/\/ender314.com\/?p=106"},"modified":"2022-09-27T01:33:04","modified_gmt":"2022-09-27T01:33:04","slug":"hashing-on-two-inputs","status":"publish","type":"post","link":"https:\/\/ender314.com\/?p=106","title":{"rendered":"Hashing on Two Inputs"},"content":{"rendered":"\n
Building a One-Way Compression Function<\/h2>\n\n\n\n
One-way compression functions are a common cryptographic primitive. A one way-compression function takes two equal-length inputs and generates an output of the same length. The output must appear random relative to the inputs, and it must be hard to find two inputs that generate a given output (the one-way criterion). Many hash functions are built from one-way compression functions, for instance using the Merkle-Damgard construction.<\/p>\n\n\n\n
We begin the search for a good function using genetic programming. The function we are looking for takes two integers as input, and produces one integer as output. The criteria are similar to general randomness criteria for a hash function. Specifically, the sequence f(1,0), f(2,0), f(3,0), \u2026 must pass strong tests of randomness. Also, flipping a single bit of either input must change the output in a completely random way (the differential test).<\/p>\n\n\n\n
After running for quite some time and exploring over 200,000 different functions, the genetic algorithm finds the solution below (in assembly and C#).<\/p>\n\n\n\n