Can I have two Time Machine partitions on one hard disk drive?
It is definitely possible to partition a single drive into two partitions and have separate encrypted Time Machine backups on each partition for your two individual Macs.

The only downside is a single point of failure since there's a single physical drive used for two machines. If anything goes wrong with that disk, both the Macs would be left without usable backups. You could still go ahead with this approach, but it would be better if you have disk clones also done regularly on (additional) separate physical drives and/or use some online backup service for important data.

For more information on Time Machine and encrypted backups, see:
Time Machine FAQ - How do I set up and use encrypted backups?