Note: I won't recommend a specific library for these, because this would be off-topic and the risk would be there that this gets outdated sooner than later (especially as soon as CAESAR finishes).
This is a very standard solution to the authentication problem although usually one does do both (e.g. passphrase and keyfile).
On the conceptual level any library exposing some sort of KBKDF or PBKDF and a decent encryption mechanism is sufficient.
What you do is simple and clear: You look at your chunk of data and extract derivation paramters from it (they are associated data), then you ask the user for the file name and completely parse it into your PBKDF / KBKDF of choice. From this you derive an encryption key and a nonce / IV and you're good to go to apply authenticated encryption on your data
You should use a password based key derivation function (PBKDF such as Argon2, scrypt or bcrypt) if you suspect the file to be low entropy (less than $2^{128}$ plausible possibilities) and use a key based key derivation function (KBKDF such as HKDF or KDF2) in all the other cases. For the actual encryption AES-EAX is your mode of choice for files that get larger than 60GB and AES-GCM for anything smaller.