Announcing crypto


#1

Hey all,

We just released crypto which is a library for cryptographic functions designed for FGPAs. We currently have support for MD5 encoding.

It includes an example kernel showing how to use it in your kernel.

We’d love for you to try it out, and share any feedback you have.


#2

I’ve noticed that the example host (code crypto/examples/md5/cmd/test-md5/main.go) has both the input and output buffers declared as ReadOnly:

	inputBuff := world.Malloc(xcl.ReadOnly, uint(msgSize))
	defer inputBuff.Free()

    outputBuff := world.Malloc(xcl.ReadOnly, 16)
	defer outputBuff.Free()

…I would have expected the output buffer to be WriteOnly. I tried simulating both ways and they both seem to work OK which is a bit weird.


#3

Digging into this, it seems to be a result of the memory controller on the FGPA. It doesn’t seem to impose any access restrictions on the card itself.

We use a base of the OpenCL runtime libraries to communicate with the FGPA, and it looks like this particular functionality isn’t present for this OpenCL target. It seems like the best thing to do is to remove this from our software API to prevent any further confusion.