First Insert is skipped by the trigger
I think it is because you are selecting from tableA.
I guess the right way to do this is:

insert into tableB(c1) values (AES_ENCRYPT(new.c1,'test'));

So, the trigger will become like this:

delimiter //
    CREATE TRIGGER trig1 before INSERT
    ON  tableA FOR EACH ROW
    BEGIN
          IF LENGTH(LTRIM(RTRIM(new.c1))) &gt; 4 then
            BEGIN
            insert into tableB(c1) values (AES_ENCRYPT(new.c1,'test'));
            Set  new.C1 = RIGHT(LTRIM(RTRIM(new.C1)),4) ;       
             END;
       end if;
    END;
    //
delimiter ;