Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sat, 8 Jun 2013 17:16:59 +0200
From: Lukas Odzioba <>
Subject: Re: sha3-opencl

2013/6/7 Dániel Bali <>:
> Host side:
> Kernel:

First my comments to your code:
1) current copyright:
 * Keccak-256 OpenCL version
 * by Daniel Bali <balijanosdaniel at>
 * 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:
I think that it would be better if it looks like this:
 * Keccak-f[1600] 256bit OpenCL
 * This software is Copyright (2013) Daniel Bali <balijanosdaniel at>,
 * 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’

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 DIGEST_SIZE         32


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.