- Can I publish my tool as it currently is with import vault/shamir? (pretty sure MPL allows this but I want to confirm). Is my disclaimer sufficient, insufficient, or overkill?
Assuming the libraries you mention in the License section of your README.md are all third-party libraries and you have the copyrights to the rest of the code, then I see nothing that would make it illegal to publish your tool.
The last paragraph in that section (your actual disclaimer I think) is not needed, but it won't hurt either. It shows you have at least the intention to abide by all relevant license terms.
- Could I fork/copy the vault/shamir.go and test code into my repo while maintaining a license notification? I do not need to vendor the entire Vault lib, so taking this subsample greatly reduces dependencies.
- Would I be able to fork/copy the code and make small modification to it? (e.g. I want a variant of Split where I pass in the seed value, for testing purposes)
Yes, the MPL license allows you to create a copy of the vault/shamir.go code and to make changes to it. Removing unused code is one of the modifications that are allowed, so it is impossible to tell if you vendored the entire Vault lib, or just that one file and associated license information.
- Would I be able to rewrite my own shamir.go from “scratch”? (kind of hard to do without “plagiarizing” since it is an algorithm and there is basically 1 way to implement an algorithm. Also the python implementation is on wikipedia). I probably don't actually want to do this, but I am curious how it works in a situation like this.
Algorithms themselves are not subject to copyright protection, only their implementations are. So, if you took the mathematical description of an algorithm and created your own implementation of it, that would be entirely your copyright.
On the other hand, if you took an existing implementation and ported that to a different language, then your implementation would likely be considered a derivative work of the source implementation and you would be bound by that implementation's license.
Re-implementing an algorithm from scratch after having seen another implementation muddies the waters, because it will be hard to tell how much was your own inspiration and how much was based on remembering how the other implementation was written. Making a copy based on memory is still making a copy as far as copyright is concerned.