Class PFSArmHandler

java.lang.Object
io.netty.channel.ChannelHandlerAdapter
io.netty.channel.ChannelInboundHandlerAdapter
io.netty.channel.ChannelDuplexHandler
io.netty.handler.codec.MessageToMessageCodec<ArmHeader,io.netty.buffer.ByteBuf>
org.drasyl.node.handler.crypto.AbstractArmHandler
org.drasyl.node.handler.crypto.PFSArmHandler
All Implemented Interfaces:
io.netty.channel.ChannelHandler, io.netty.channel.ChannelInboundHandler, io.netty.channel.ChannelOutboundHandler

public class PFSArmHandler extends AbstractArmHandler
Arms (encrypt) outbound and disarms (decrypt) inbound messages. Messages that could not be (dis-)armed are dropped. Does key-exchange with ephemeral keys to achieve PFS.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    protected static enum 
     

    Nested classes/interfaces inherited from interface io.netty.channel.ChannelHandler

    io.netty.channel.ChannelHandler.Sharable
  • Field Summary

    Fields inherited from class org.drasyl.node.handler.crypto.AbstractArmHandler

    crypto, identity, peerIdentity, session
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
     
    PFSArmHandler(Crypto crypto, Duration expireAfter, Duration retryInterval, int maxAgreements, Identity identity, IdentityPublicKey peerIdentity)
     
    protected
    PFSArmHandler(Crypto crypto, Identity identity, IdentityPublicKey peerIdentity, Session session, LongSupplier expireProvider, Duration retryInterval, PFSArmHandler.State state)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    decode(io.netty.channel.ChannelHandlerContext ctx, ArmHeader msg, List<Object> out)
     
    protected void
    encode(io.netty.channel.ChannelHandlerContext ctx, io.netty.buffer.ByteBuf msg, List<Object> out)
     
    protected Agreement
     
    protected void
    inboundArmMessage(io.netty.channel.ChannelHandlerContext ctx, Object msg)
     
    protected void
    onNonAgreement(io.netty.channel.ChannelHandlerContext ctx)
     
    protected void
    removeStaleAgreement(io.netty.channel.ChannelHandlerContext ctx, Agreement agreement)
     

    Methods inherited from class org.drasyl.node.handler.crypto.AbstractArmHandler

    arm, unarm

    Methods inherited from class io.netty.handler.codec.MessageToMessageCodec

    acceptInboundMessage, acceptOutboundMessage, channelRead, write

    Methods inherited from class io.netty.channel.ChannelDuplexHandler

    bind, close, connect, deregister, disconnect, flush, read

    Methods inherited from class io.netty.channel.ChannelInboundHandlerAdapter

    channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered

    Methods inherited from class io.netty.channel.ChannelHandlerAdapter

    ensureNotSharable, handlerAdded, handlerRemoved, isSharable

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface io.netty.channel.ChannelHandler

    handlerAdded, handlerRemoved