% Quantum Key Distribution (QKD) protocol
% Version: January 14, 2016
classdef QKD_Peer < handle
    % parent class for Alice and Bob
    properties
        % rectilinear basis and diagonal basis angles
        basis=[['-', '|'] ; ['/', '\']];
        % data bits
        data=[]; 
    end    
    methods
        % calculate and return sifted key
        function [ key ] = siftedKey(obj, Alice_bases, Bob_basis )
            key=obj.data(find(Alice_bases==Bob_basis));
        end
    end  
end

