Date: Sat, 8 Jun 2013 17:16:59 +0200 From: Lukas Odzioba <lukas.odzioba@...il.com> To: john-dev@...ts.openwall.com Subject: Re: sha3-opencl 2013/6/7 Dániel Bali <balijanosdaniel@...il.com>: > Host side: > https://github.com/balidani/JohnTheRipper/blob/bleeding-jumbo/src/opencl_rawkeccak256_fmt.c > > Kernel: > https://github.com/balidani/JohnTheRipper/blob/bleeding-jumbo/src/opencl/keccak256_kernel.cl First my comments to your code: 1) current copyright: /* * Keccak-256 OpenCL version * by Daniel Bali <balijanosdaniel at gmail.com> * based on public domain code by Matt Mahoney * based on rawKeccak256_fmt.c by Dhiru Kholia * * Usage: john --format:raw-keccak-256-opencl <hash file> * * This file is part of John the Ripper password cracker, * Copyright (c) 2013 by Solar Designer * */ According to this document: http://openwall.info/wiki/john/licensing I think that it would be better if it looks like this: /* * Keccak-f 256bit OpenCL * This software is Copyright (2013) Daniel Bali <balijanosdaniel at gmail.com>, * and it is hereby released to the general public under the following terms: * Redistribution and use in source and binary forms, with or without * modification, are permitted. * Code is based on: * - public domain code by Matt Mahoney //this for kernel only * - rawKeccak256_fmt.c by Dhiru Kholia //this for fmt only */ Since Solar did not any changes to this file there is no need to add his name. Usage is optional, especially in non plug formats I doubt that someone will read that, you might leave it if you wish. 2) You should add a few more tests, for example an empty string and string with lenght = PLAINTEXT_LENGTH 3) Please get rid of those warnings: opencl_rawkeccak256_fmt.c: In function ‘crypt_all’: opencl_rawkeccak256_fmt.c:331:9: warning: unused variable ‘i’ [-Wunused-variable] 4) crypt_all_benchmark and crypt_all functions looks identical for me. 5) #define BUFSIZE ((PLAINTEXT_LENGTH+3)/4*4) //This is eqal to 3, are you sure this is a proper value? 6) I suppose that your problems with memory are related to mess in size of the buffers: One bug below: buffer_out = clCreateBuffer(context[ocl_gpu_id], CL_MEM_WRITE_ONLY, DIGEST_SIZE * kpc, NULL, &ret_code); #define CIPHERTEXT_LENGTH 64 #define DIGEST_SIZE 32 Lukas
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.