I have a public smart contract where I am able to make a secret and hash it within the contract. I then share the "secret" with N number of my friends and with the secret they can create a new hash (secret + private key) to prove to the contract that they in fact know the secret and have access to send funds.
The contract would only know the secret internal hash + the new sent hash + the msg.sender public key. Would this be enough to prove to the contract that the msg.sender know the secret and is allowed access to the contract functions?
Can't this be done? It sounds like a zero-knowledge proof algorithm, but I am not an expert in cryptography so not sure if it's a viable solution.