Yes, that is the point. And that is the reason this isn't a good idea.
In order for implementation A to be drop-in compatible with implementation B, the data formats and methods must be identical (otherwise all data produced by A can't be consumed by B). At which point you're no longer specifying the interface, but the implementation as well. At which point what you're trying to do fails.
Unless you say that you don't care about data compatibility. And each implementation is free to implement as they wish. But then, things quickly deteriorate as well.
The problem is that there is so much that goes into an implementation that an interface would need to be *really* simple:
public function encrypt($data);
public function decrypt($data);
The second you add things like "keys" or "options", it starts to get overwhelmingly complicated.
And that's just talking about symmetric key block ciphers.
What about stream ciphers? What about public key cryptography. What about authentication. What about signing. What about key generation. What about key derivation.
Things get so complicated so quickly that it's a severe can of worms that you're opening by going down this route.
At best it won't be successful. At worst, it won't be secure.
Instead, what I'd rather see than a "standard interface(s)", would be standard implementations. Multiple. One for each usecase
class BlockCipher {
public function encrypt($data);
public function decrypt($data);
}
class StreamCipher {
public function open($mode = StreamCipher::ENCRYPT);
public function write($data);
}
class Authentication {
public function authenticate($data);
}
etc.
Simple interfaces, with a centrally maintained implementation that can be reviewed.
There are definite drawbacks to having a large number of cryptographic implementations. There are fewer to having a single implementation. And a single implementation that can be peer reviewed and maintained is going to be infinitely better than a dozen or so implementations that may or may not be. And audits are not a replacement for solid peer review.
Interoperability is an awesome goal. But I think in this case, it will do nothing but cause harm.
My $0.02.
Anthony