As Dunc said, this is a terrible idea if you’re actually trying to secure things, but an awesome idea if you want to learn about how encryption works
I’m still a bit unsure as to why you specifically want to use two keys, but let’s say you’re trying to make a dual-custody lock and you want better security than Soviet era locks.
If you want two different people to have to enter their passwords in order to encrypt/decrypt something, the first thing you want to do is to hash those keys, because otherwise there’ll be a lot of detectable properties in the passwords themselves. So you’ll start with something like this:
>>> hashlib.sha256(b"password").hexdigest()
'5e884898da28047151d0e56f8dc6292773603d0d6aabbdd62a11ef721d1542d8'
>>> hashlib.sha256(b"secret").hexdigest()
'2bb80d537b1da3e38bd30361aa855686bde0eacd7162fef6a25fe97bf527a25b'
Okay. So now, regardless of the passwords used, you have two encryption keys of predictable length. (Note that, in order to actually have 256 bits of real entropy, you would need an incredibly long passphrase; but using SHA256 is convenient.) The next question is, what do we do with those? The nearest equivalent to a Vignere cipher would be to XOR your message with these bytes - which is a pretty good idea, so I think you’re onto something there. So long as your message is less than 32 bytes long, we can just do that; we’ll use the binary version of the keys here rather than hex:
>>> key1 = hashlib.sha256(b"password").digest()
>>> key2 = hashlib.sha256(b"secret").digest()
>>> plaintext = b"Hello, world!"
>>> encrypted = bytes(p ^ k1 ^ k2 for p, k1, k2 in zip(plaintext, key1, key2))
>>> encrypted
b'=U)\xa7\xce\x19\x87\xe5\xb5q\x8aj\x06'
>>> encrypted.hex()
'3d5529a7ce1987e5b5718a6a06'
What have I done here? I’ve taken the first byte of the original text (“H”, 0x48) and done a bitwise XOR with the first byte of each key (0x5E and 0x2B). This results in the first byte of our encrypted text (“=”, 0x3D).
This is quite secure so long as (a) your passwords really do have good entropy, and (b) your plaintext is as long as, or shorter than, your hashed passwords. If you want to send longer messages, you need some way to turn a 32-byte encryption key into a much longer one. You could simply duplicate it, but then you’d risk someone figuring out the pattern and exploiting that to detect the keys. A better way might be to take the SHA256 of the key to form the next key, then take the hash of that for the third key, the hash of that for the fourth key, and so on.
There’s another problem here, though: you really only have one key, formed by combining the two. Have a think about how you might disrupt that; what could you do that would ensure that the two keys aren’t just forming two halves of the same key?
There’s a lot in here that’s fun to think about. But just remember, if you ACTUALLY want to secure something, use an encryption algorithm that’s had more people think about it than just you. The standard algorithms available in your libraries are tested, mathematically evaluated, and battle hardened. What you’re doing here is strictly for educational purposes - and on that basis, can be extremely worthwhile.