Here's a quick one if your filesystem supports hard links:
#!/bin/ksh
typeset -A hashes
find . -type f -exec shasum -a 512 {} \; |
while read hash filename; do
if [[ -z ${hashes[$hash]} ]]; then
hashes[$hash]="$filename"
else
echo ln -f "'${hashes[$hash]}'" "'$filename'"
fi
done
Pipe to /bin/sh if you're happy with the results.